From: Josh Stompro Date: Wed, 26 Feb 2020 16:48:06 +0000 (-0600) Subject: LP#1848975 - open-ils.search.biblio.record.mods_slim.retrieve Array warning X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fstompro%2Flp1848975_mods_slim_array_warning;p=working%2FEvergreen.git LP#1848975 - open-ils.search.biblio.record.mods_slim.retrieve Array warning 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 --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 159ecd78b9..4ea5ef49b8 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -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 );