Skip to content

Commit

Permalink
Actually return undef from GetItem() if item does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ctfliblime committed Jun 1, 2011
1 parent e94bf02 commit 75d0354
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions C4/Items.pm
Expand Up @@ -146,6 +146,8 @@ sub GetItem {
$sth->execute($barcode);
$data = $sth->fetchrow_hashref;
}
return if (!$data);

if ( $serial) {
my $ssth = $dbh->prepare("SELECT serialseq,publisheddate from serialitems left join serial on serialitems.serialid=serial.serialid where serialitems.itemnumber=?");
$ssth->execute($data->{'itemnumber'}) ;
Expand Down

0 comments on commit 75d0354

Please sign in to comment.