]> git.koha-community.org Git - koha.git/commit
Bug 21556: Do not crash if a biblio is deleted twice
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 16 Oct 2018 17:52:25 +0000 (14:52 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 1 Nov 2018 19:05:12 +0000 (19:05 +0000)
commit515ed462cff54afd0725471c977d437fbeb54aa4
tree68f01af07149dbe65f6834151abe4be112f655f1
parent9d78af26d96dd356a1ca05199c0fec20cd5077e1
Bug 21556: Do not crash if a biblio is deleted twice

To recreate:
- Go to a bibliographic detail page
- Delete it
- Go back
- Delete it again
=> Without this patch you will get a 500
 Can't call method "holds" on an undefined value at
 /home/vagrant/kohaclone/C4/Biblio.pm line 406.
=> With this patch applied it will silently redirect you to the search
form.

Note: We could/should improve the behavior and display a message, but
DelBiblio will need to be moved to Koha::Biblio->delete and other
callers adjusted

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Biblio.pm
t/db_dependent/Biblio.t