LP1895660: Search/Authority.pm
authorJason Boyer <JBoyer@equinoxinitiative.org>
Tue, 15 Sep 2020 19:37:09 +0000 (15:37 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 14 May 2021 21:38:09 +0000 (17:38 -0400)
Argument "" isn't numeric in numeric ne (!=)

One of the "fun" things about perl and its type system is that
it uses different operators to compare strings vs comparing numbers...

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Authority.pm

index 2778912..93b1ab1 100644 (file)
@@ -76,7 +76,7 @@ sub search_authority_by_simple_normalize_heading {
     my $e = new_editor();
     my $norm_heading = $e->json_query($norm_heading_query)->[0]->{'authority.simple_normalize_heading'};
 
-    unless (defined($norm_heading) && $norm_heading != '') {
+    unless (defined($norm_heading) && $norm_heading ne '') {
         return OpenILS::Event->new('BAD_PARAMS', note => 'Heading normalized to null or empty string');
     }