From: Jeff Godin Date: Wed, 2 May 2012 14:25:15 +0000 (-0400) Subject: Protect against warnings when no isbn/upc provided X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=934cdd85e5487894d5e05d20fad6aee1d90ab40a;p=working%2FEvergreen.git Protect against warnings when no isbn/upc provided Protect against Perl giving us uninitialized value warnings when isbn or upc has not been provided. Signed-off-by: Jeff Godin --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm index 0f236340ca..1cf11c4622 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm @@ -258,6 +258,9 @@ sub fetch_response { my $isbn = $keys->{isbn}[0]; my $upc = $keys->{upc}[0]; + $isbn = '' if !defined($isbn); + $upc = '' if !defined($upc); + my $url = $self->base_url . "?isbn=$isbn/$page&upc=$upc&client=$uname" . (($notype) ? '' : "&type=rw12"); return $AC->get_url($url); }