Bug 3784: Don't fail on opac-detail.pl with invalid biblionumber
This commit is contained in:
parent
9bebe2e914
commit
1d9de57e23
1 changed files with 4 additions and 4 deletions
|
@ -66,6 +66,10 @@ $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHo
|
|||
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
if ( ! $record ) {
|
||||
print $query->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
exit;
|
||||
}
|
||||
$template->param( biblionumber => $biblionumber );
|
||||
# XSLT processing of some stuff
|
||||
if (C4::Context->preference("XSLTDetailsDisplay") ) {
|
||||
|
@ -87,10 +91,6 @@ if (C4::Context->preference('hidelostitems')) {
|
|||
}
|
||||
my $dat = &GetBiblioData($biblionumber);
|
||||
|
||||
if (!$dat) {
|
||||
print $query->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
exit;
|
||||
}
|
||||
my $itemtypes = GetItemTypes();
|
||||
# imageurl:
|
||||
my $itemtype = $dat->{'itemtype'};
|
||||
|
|
Loading…
Reference in a new issue