]> 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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 3 Nov 2022 13:02:55 +0000 (10:02 -0300)
commit7d8a35585b4d2047e404fb4a1ce19596737d68ab
treecd04ab94af6ae30ca28895cb117b0ef57eac20fd
parentecb9932fd3d3c2f2c0fe96aac53f1faa6331f2ab
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>
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt