[Koha-bugs] [Bug 24966] Fix calls to maybe_add where method call does not return a value
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 8 19:44:40 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24966
Kyle M Hall <kyle at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #101632|0 |1
is obsolete| |
--- Comment #7 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 102584
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102584&action=edit
Bug 24966: [Alt] Fix calls to maybe_add where method call does not return a
value
For reasons unknown to me, a call like:
--
$resp .= maybe_add( FID_CALL_NUMBER, $item->call_number, $server );
--
will not work as expected if the item has no callnumber.
One would expect the parameters to the subroutine to be: 'CY', under, and a
SIPServer object.
What is actually received is: 'CY', and a SIPServer object.
We ingest the parameters like so:
--
sub maybe_add {
my ($fid, $value, $server) = @_;
--
So, what happens is $value is populated with the server object!
This can cause bad output like this:
--
OUTPUT MSG: '101YNN20200324 063701AOBPL|AB32503201584185|AQBPL|AJCat
/|CK001|CRn|CSJ 636.8
CLU|CYC4::SIP::SIPServer=HASH(0x1ea0e58)|DAC4::SIP::SIPServer=HASH(0x1ea0e58)|'
--
Test Plan:
1) On master, perform a checkin of an item not on hold using the sip cli tester
2) Note some fields contain something like 'C4::SIP::SIPServer=HASH(0x1ea0e58)'
3) Apply this patch
4) Restart the SIP server
5) Perform the SIP checkin again
6) Those fields from step 2 should be gone!
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Barbara Johnson <Barbara.Johnson at bedfordtx.gov>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list