]> 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)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Thu, 26 Jan 2023 09:02:20 +0000 (10:02 +0100)
commite4ab9602c036f246797ba1ba09e1624a678ea1b3
tree76f73ce9a76dd589501fed19dffc73ffbd637d11
parent527b2b634f72b8f8025fc58b404b5022dc3eb3e9
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>
(cherry picked from commit 65d267dd903c9158f63b4e91ff791eb0398e2849)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt