[Koha-bugs] [Bug 14344] uninitialized value warning C4/Utils/DataTables/Members.pm

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 5 17:09:10 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344

--- Comment #1 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 39911
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39911&action=edit
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:
- In current master, search for a user (I searched 'acevedo') 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

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


More information about the Koha-bugs mailing list