Bug 25506 - Perl undef warning on the "About Koha" page
Summary: Perl undef warning on the "About Koha" page
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: About (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Slava Shishkin
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25790
  Show dependency treegraph
 
Reported: 2020-05-14 14:51 UTC by Slava Shishkin
Modified: 2020-06-17 21:09 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.07, 19.05.12


Attachments
Bug 25506: Fix for "Use of uninitialized value" in about.pl (1.60 KB, patch)
2020-05-14 15:00 UTC, Slava Shishkin
Details | Diff | Splinter Review
Bug 25506: Fix for "Use of uninitialized value" in about.pl (1.65 KB, patch)
2020-05-16 07:59 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 25506: Fix for "Use of uninitialized value" in about.pl (1.71 KB, patch)
2020-05-21 13:22 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Shishkin 2020-05-14 14:51:05 UTC
Perl warning on the "About Koha" page:

Use of uninitialized value in string eq
at /home/vagrant/kohaclone/about.pl line 220.
Comment 1 Slava Shishkin 2020-05-14 15:00:12 UTC
Created attachment 104892 [details] [review]
Bug 25506: Fix for "Use of uninitialized value" in about.pl

Perl warning on the "About Koha" page:

Use of uninitialized value in string eq
at /home/vagrant/kohaclone/about.pl line 220.

Fixed by adding additional precheck for
C4::Context->config('zebra_auth_index_mode') being Perl's "true".

To test:
    1) Ensure you don't have "<zebra_auth_index_mode>...
       </zebra_auth_index_mode>" in your koha-conf.xml so you will have
       "C4::Context->config" returning "undef"
    2) Go to the "About Koha" page.
    3) Observe the warning in the log file.
    4) Apply patch.
    5) Repeat step 2.
    6) Check that previous warning was suppressed.
Comment 2 Andreas Roussos 2020-05-16 07:59:49 UTC
Created attachment 104980 [details] [review]
Bug 25506: Fix for "Use of uninitialized value" in about.pl

Perl warning on the "About Koha" page:

Use of uninitialized value in string eq
at /home/vagrant/kohaclone/about.pl line 220.

Fixed by adding additional precheck for
C4::Context->config('zebra_auth_index_mode') being Perl's "true".

To test:
    1) Ensure you don't have "<zebra_auth_index_mode>...
       </zebra_auth_index_mode>" in your koha-conf.xml so you will have
       "C4::Context->config" returning "undef"
    2) Go to the "About Koha" page.
    3) Observe the warning in the log file.
    4) Apply patch.
    5) Repeat step 2.
    6) Check that previous warning was suppressed.

Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Comment 3 Katrin Fischer 2020-05-21 13:22:30 UTC
Created attachment 105192 [details] [review]
Bug 25506: Fix for "Use of uninitialized value" in about.pl

Perl warning on the "About Koha" page:

Use of uninitialized value in string eq
at /home/vagrant/kohaclone/about.pl line 220.

Fixed by adding additional precheck for
C4::Context->config('zebra_auth_index_mode') being Perl's "true".

To test:
    1) Ensure you don't have "<zebra_auth_index_mode>...
       </zebra_auth_index_mode>" in your koha-conf.xml so you will have
       "C4::Context->config" returning "undef"
    2) Go to the "About Koha" page.
    3) Observe the warning in the log file.
    4) Apply patch.
    5) Repeat step 2.
    6) Check that previous warning was suppressed.

Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2020-05-22 08:34:10 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Aleisha Amohia 2020-06-10 03:35:21 UTC
backported to 19.11.x for 19.11.07
Comment 6 Victor Grousset/tuxayo 2020-06-12 00:00:56 UTC
Backported to 19.05.x branch for 19.05.12