Bug 20696 - Remove a few ugly "eq undef" comparisons
Summary: Remove a few ugly "eq undef" comparisons
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-02 14:11 UTC by Marcel de Rooy
Modified: 2018-10-24 09:13 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm (2.05 KB, patch)
2018-05-02 14:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm (2.12 KB, patch)
2018-05-10 14:43 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm (2.19 KB, patch)
2018-05-18 07:38 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2018-05-02 14:11:04 UTC
Title speaks for itself?
Comment 1 Marcel de Rooy 2018-05-02 14:19:20 UTC
Created attachment 74982 [details] [review]
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm

Comparisons like $a eq undef should normally raise a warning like:
    Use of uninitialized value in string eq at ...
But unfortunately we still suppress warnings here and there.

Test plan:
[1] Just read this patch and confirm the small changes.
[2] Git grep on "eq undef" and do not find other occurrences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Owen Leonard 2018-05-10 14:43:26 UTC
Created attachment 75224 [details] [review]
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm

Comparisons like $a eq undef should normally raise a warning like:
    Use of uninitialized value in string eq at ...
But unfortunately we still suppress warnings here and there.

Test plan:
[1] Just read this patch and confirm the small changes.
[2] Git grep on "eq undef" and do not find other occurrences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Passes test plan and QA tools. Searching works correctly.
Comment 3 Julian Maurice 2018-05-18 07:38:52 UTC
Created attachment 75402 [details] [review]
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm

Comparisons like $a eq undef should normally raise a warning like:
    Use of uninitialized value in string eq at ...
But unfortunately we still suppress warnings here and there.

Test plan:
[1] Just read this patch and confirm the small changes.
[2] Git grep on "eq undef" and do not find other occurrences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Passes test plan and QA tools. Searching works correctly.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 4 Nick Clemens 2018-05-29 14:43:35 UTC
Pushed to master for 18.11.

Awesome work all, thank you.
Comment 5 Martin Renvoize 2018-06-05 10:43:42 UTC
This patch has been pushed to 18.05.x and will be in 18.05.01
Comment 6 Fridolin SOMERS 2018-06-07 07:02:33 UTC
Pushed to 17.11.x for 17.11.07.

Ugly indeed ;)