| Summary: | CRASH: Can't call method "itemlost" on an undefined value | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
| Component: | Architecture, internals, and plumbing | Assignee: | Marcel de Rooy <m.de.rooy> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | trivial | ||
| Priority: | P5 - low | CC: | fridolin.somers |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | Trivial patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: |
23.11.00,23.05.06,22.11.12
|
Circulation function: | |
| Attachments: |
Bug 32379: Add check on existing item
Bug 32379: Add check on existing item Bug 32379: Add check on existing item |
||
Where was that btw?
cataloguing/additem.pl: my $olditemlost = $item->itemlost;
L552 (current master)
# FIXME Handle non existent item
my $olditemlost = $item->itemlost;
Created attachment 158240 [details] [review] Bug 32379: Add check on existing item Simplest fix; bail out with output_error. Test plan: Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999 Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist. You should get the 404 screen now. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 158264 [details] [review] Bug 32379: Add check on existing item Simplest fix; bail out with output_error. Test plan: Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999 Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist. You should get the 404 screen now. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Created attachment 158385 [details] [review] Bug 32379: Add check on existing item Simplest fix; bail out with output_error. Test plan: Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999 Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist. You should get the 404 screen now. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.06 Nice work everyone! Pushed to 22.11.x for next release |
21.11 my $item = Koha::Items->find($itemnumber); # FIXME Handle non existent item [L426] my $olditemlost = $item->itemlost; MASTER my $itemnumber = $input->param('itemnumber'); my $item = Koha::Items->find($itemnumber); # FIXME Handle non existent item [L535] my $olditemlost = $item->itemlost; Confirming the FIXME ;)