Bug 33702: (QA follow-up) Do not crash on borrowernumber
Resolve: Can't call method "borrowernumber" on an undefined value at /usr/share/koha/opac/opac-illrequests.pl line 66 Test plan: Put an unexisting illrequest_id in the URL parameter. You should see a 404, not a crash. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
b5cae12aef
commit
4ede366268
|
|
@ -63,7 +63,7 @@ my ( $illrequest_id, $request );
|
|||
if ( $illrequest_id = $params->{illrequest_id} ) {
|
||||
$request = Koha::Illrequests->find($illrequest_id);
|
||||
# Make sure the request belongs to the logged in user
|
||||
unless ( $request->borrowernumber == $loggedinuser ) {
|
||||
if( !$request || $request->borrowernumber != $loggedinuser ) {
|
||||
print $query->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue