[Koha-bugs] [Bug 29056] Remove demo functionality remnants

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 20 10:44:53 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29056

--- Comment #1 from Andrew Nugged <nugged at gmail.com> ---
also to note maybe for separate tickets later (needs to be analyzed):

this

    `unless ( C4::Context->config('demo') ) { ... `

it's never failed because it returns _REFERENCE_TO_HASH_,
even the hash is empty:


```
sub set_preferences {
    warn C4::Context->config( 'demo' );
    warn C4::Context->config( 'demo' ) ? 'TRUTH' : 'FALSE';
    warn Dumper(C4::Context->config( 'demo' ));

    unless ( C4::Context->config('demo') ) {
        ...
```

Gives:
[2021/09/20 10:42:56] [WARN] HASH(0x5646ead56e00)
[2021/09/20 10:42:56] [WARN] TRUTH
[2021/09/20 10:42:56] [WARN] $VAR1 = {};

We might have other "if/unless ->config" usages not even for the "demo" key in
our code which might be degraded with this "always true" trick.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list