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

Frédéric Demians <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29683|0                           |1
        is obsolete|                            |

--- Comment #3 from Frédéric Demians <[email protected]> ---
Created attachment 32769
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32769&action=edit
Bug 12573: Use correct comparison for comparing strings

Perl issues a warning when you try to do a numeric comparison on
non numeric values. While in 99% of the caeses numeric and string
comparison behave similarly when they dont tracking down resulting
bugs is hard. Also we dont want to be logging errors for normal
operations. replace numeric == with eq
(also switched to non-interpolating quotes so we dont generate
a warning from static code checkers like perlcritic)

Signed-off-by: Frederic Demians <[email protected]>

I can get this warnings in log files. This patch make perfectly sense.
MARC subfield code should never be tested with Perl == operator, since
the code could be letter or a number. Perl eq operator do an implicit
string conversion for value which is a number, so it will work in any
case.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to