Bug 31192 - Checking in an unkown barcode causes error
Summary: Checking in an unkown barcode causes error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 28854
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-19 19:40 UTC by Nick Clemens
Modified: 2023-06-08 22:26 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31192: Check for item before calling is_bundle (1.22 KB, patch)
2022-07-20 08:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 31192: Check for item before calling is_bundle (1.29 KB, patch)
2022-07-20 08:48 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 31192: Check for item before calling is_bundle (1.34 KB, patch)
2022-07-20 14:16 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-07-19 19:40:01 UTC
Can't call method "is_bundle" on an undefined value at /kohadevbox/koha/circ/returns.pl line 413
Comment 1 Martin Renvoize 2022-07-20 08:31:10 UTC
Created attachment 137896 [details] [review]
Bug 31192: Check for item before calling is_bundle

The code in here is weird.. we really aught to check for the item before
anything else and throw an error to screen if we don't find one... but
my patch takes the simple option, and the one taken elsewhere in the
script.. to just check for item being defined before calling a method
upon it.
Comment 2 Biblibre Sandboxes 2022-07-20 08:48:40 UTC
Created attachment 137903 [details] [review]
Bug 31192: Check for item before calling is_bundle

The code in here is weird.. we really aught to check for the item before
anything else and throw an error to screen if we don't find one... but
my patch takes the simple option, and the one taken elsewhere in the
script.. to just check for item being defined before calling a method
upon it.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Sally 2022-07-20 08:50:40 UTC
The patch fixes the reported problem, signing off.  Thanks for the patch.
Comment 4 Nick Clemens 2022-07-20 14:16:43 UTC
Created attachment 137926 [details] [review]
Bug 31192: Check for item before calling is_bundle

The code in here is weird.. we really aught to check for the item before
anything else and throw an error to screen if we don't find one... but
my patch takes the simple option, and the one taken elsewhere in the
script.. to just check for item being defined before calling a method
upon it.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2022-07-20 14:54:44 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass 2022-08-23 20:09:28 UTC
Missing dependencies for 22.05.x, no backport