]> git.koha-community.org Git - koha.git/commit
Bug 28213: Prevent crash if patron or club deleted after search to hold
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Apr 2021 09:10:11 +0000 (11:10 +0200)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 24 May 2021 19:09:30 +0000 (19:09 +0000)
commit706badc28917cac3ccb8d5acd666e55e481644ce
tree44855cd74ac33359d4ad6dca90d3589471808087
parentea3428a5dcc85b0d1ee8f624328d6a37d2660ee9
Bug 28213: Prevent crash if patron or club deleted after search to hold

Deleting a patron or patron club causes server error on searching.

To recreate:
- create a club template
- create a club
- enroll a patron in the club
- from the clubs page, select Search To Hold for your club
- do a search, see that it says "Hold for [club name]" in your search results page
- go back to the clubs page and delete your club
- try to perform a search
=> Without this patch you get "Can't call method "name" on an undefined value at /kohadevbox/koha/catalogue/search.pl line 207"

Same when placing a hold for a patron (check the search result and the
detail pages)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0633590f55b2dcf0c515e50469b034e563819ced)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f307bc2786ddd1a31d09a52913a047b04ac2bed3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
catalogue/detail.pl
catalogue/search.pl