Permalink
Browse files

Fix up miscellaneous errors resulting from bad bib numbers

  • Loading branch information...
1 parent 1a14544 commit e6444549f53cf8a8a118c24c18d48854233e20f0 @ctfliblime ctfliblime committed Feb 19, 2012
Showing with 7 additions and 1 deletion.
  1. +5 −0 cgi/opac/opac-detail.pl
  2. +1 −0 cgi/opac/opac-reserve.pl
  3. +1 −1 cgi/opac/unapi
View
@@ -66,6 +66,11 @@ BEGIN
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
my $record = GetMarcBiblio($biblionumber);
+unless ($record) {
+ print $query->header( -status => 404);
+ exit 0;
+}
+
$template->param( biblionumber => $biblionumber );
# XSLT processing of some stuff
if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
View
@@ -405,6 +405,7 @@ ($$$)
foreach my $biblioNum (@biblionumbers) {
my $record = GetMarcBiblio($biblioNum);
+ next unless $record;
my $subtitle = C4::Biblio::get_koha_field_from_marc('bibliosubtitle', 'subtitle', $record, '');
# Init the bib item with the choices for branch pickup
View
@@ -44,7 +44,7 @@ use C4::Biblio;
use XML::LibXML;
use XML::LibXSLT;
-my $cgi = CGI->new();
+our $cgi = CGI->new();
binmode(STDOUT, "utf8"); #output as utf8
=head1 VARIABLES

0 comments on commit e644454

Please sign in to comment.