Koha-clms/C4/Utils/DataTables
Tomas Cohen Arazi c0c16392b1 Bug 14344: uninitialized value warning C4/Utils/DataTables/Members.pm
The condition for the assignment depends on $searchtype to be defined
and equal to 'contains'. So this change doesn't change the semantics.

-            if $term !~ /^%/
-                and $searchtype eq "contain";
+            if (defined $searchtype) && $searchtype eq "contain"
+                && $term !~ /^%/;

To test:
- Home -> Circulation -> Checkout
- Search for a user that does not exist (I searched 'whywouldthisexist') on the intranet interface.
- Look at the intranet logs
=> FAIL: you get "Use of uninitialized value $searchtype in string eq at.,,"
- Apply the patch
- Repeat the search
=> SUCCESS: No warning
- Sign off :-D

NOTE: Other pages are more forgiving. Tweaked test plan.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d82aeb352f)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2015-06-09 11:08:46 +12:00
..
ColumnsSettings.pm Bug 10212: Use the update_or_create DBIC method when possible 2014-08-26 09:29:05 -03:00
Members.pm Bug 14344: uninitialized value warning C4/Utils/DataTables/Members.pm 2015-06-09 11:08:46 +12:00
VirtualShelves.pm Bug 13421: (QA followup) Change creation_time to created_on 2015-05-04 12:31:59 -03:00