LP1895660: Booking.pm, Search/Biblio.pm
authorJason Boyer <JBoyer@equinoxinitiative.org>
Wed, 21 Oct 2020 20:29:25 +0000 (16:29 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 14 May 2021 21:38:12 +0000 (17:38 -0400)
Argument "whatev_strings" isn't numeric in numeric eq (==) at ...

A couple places that use == to compare strings. Numbers are == to
each other, but strings are eq to each other.

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/Booking.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm

index f396de7..8b48d7c 100644 (file)
@@ -1218,7 +1218,7 @@ sub cancel_reservation {
         $e->xact_begin;
 
         if (
-            $bresv->target_resource_type->catalog_item == "t" &&
+            $bresv->target_resource_type->catalog_item eq "t" &&
             $bresv->current_resource
         ) {
             $logger->info("result of no-op checkin (upon cxl bresv) is " .
index 3606106..1b85799 100644 (file)
@@ -138,7 +138,7 @@ sub record_id_to_mods_slim {
     my( $self, $client, $id ) = @_;
     return undef unless defined $id;
 
-    if(ref($id) and ref($id) == 'ARRAY') {
+    if(ref($id) and ref($id) eq 'ARRAY') {
         return _records_to_mods( @$id );
     }
     my $mods_list = _records_to_mods( $id );