LP#1848975 - open-ils.search.biblio.record.mods_slim.retrieve Array warning user/stompro/lp1848975_mods_slim_array_warning
authorJosh Stompro <stompro@stompro.org>
Wed, 26 Feb 2020 16:48:06 +0000 (10:48 -0600)
committerJosh Stompro <stompro@stompro.org>
Wed, 26 Feb 2020 16:48:06 +0000 (10:48 -0600)
When calling open-ils.search.biblio.record.mods_slim.retrieve with an
array of record ids, there is a warning because the wrong comparison
operator is used.  Using eq instead of == fixes the warning.

Testing can be done with srfsh and a command like

srfsh# request open-ils.search open-ils.search.biblio.record.mods_slim.retrieve [102916]

Check the logs for the warning, and then lack of warning.

Signed-off-by: Josh Stompro <stompro@stompro.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm

index 159ecd7..4ea5ef4 100644 (file)
@@ -139,7 +139,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 );