Bug 40929: Add $hold test in opac-modrequest
Test plan: Login at OPAC. Pass an unexisting reserve_id in a opac-modrequest.pl URL. Verify that you get a 403 redirect. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
51f2b5e12d
commit
013a469b45
|
|
@ -46,7 +46,7 @@ if ( $reserve_id && $borrowernumber ) {
|
|||
|
||||
my $hold = Koha::Holds->find($reserve_id);
|
||||
|
||||
unless ( $hold->borrowernumber == $borrowernumber ) {
|
||||
unless ( $hold && $hold->borrowernumber == $borrowernumber ) {
|
||||
|
||||
# whatcha tryin to do?
|
||||
print $query->redirect('/cgi-bin/koha/errors/403.pl');
|
||||
|
|
|
|||
Loading…
Reference in New Issue