]> git.koha-community.org Git - koha.git/commit
Bug 31873: Check ->find before calling ->safe_delete
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 19 Oct 2022 13:48:18 +0000 (13:48 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 17 Jan 2023 15:39:09 +0000 (15:39 +0000)
commit65d267dd903c9158f63b4e91ff791eb0398e2849
tree7c4e34c3238bce65af69510e5627d7de472a1381
parent817438362c2a9cb492c961744385bcc01cf59541
Bug 31873: Check ->find before calling ->safe_delete

When there is no item, you cannot safely delete it :)

Resolve this warning:
  Can't call method "safe_delete" on an undefined value at /usr/share/koha/cataloguing/additem.pl line 379
(Line numbers may vary across versions.)

Test plan:
Open item editor.
Add a new item.
Add another tab with same form. Delete new item.
Go back to former tab. Try to delete again.
You should see an alert now on top of the form.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d8a35585b4d2047e404fb4a1ce19596737d68ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt