Bug 20310: (follow-up) Check if biblio exists; 755 host_record.t
In order to prevent an error like: Can't call method "host_record" on an undefined value at opac/opac-request-article.pl Also chmod's host_record.t to 755 (File must have the exec flag) Test plan: Change the URL so that the biblionumber does not exist. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
bf5ed39364
commit
cc316db0b1
|
|
@ -40,6 +40,10 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
|||
my $action = $cgi->param('action') || q{};
|
||||
my $biblionumber = $cgi->param('biblionumber');
|
||||
my $biblio = Koha::Biblios->find($biblionumber);
|
||||
if( !$biblio ) {
|
||||
print $cgi->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $action eq 'create' ) {
|
||||
my $branchcode = $cgi->param('branchcode');
|
||||
|
|
|
|||
Loading…
Reference in New Issue