[Koha-bugs] [Bug 4450] Type of error return causes problems
bugzilla-daemon at kohaorg.ec2.liblime.com
bugzilla-daemon at kohaorg.ec2.liblime.com
Fri May 7 15:32:37 CEST 2010
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4450
--- Comment #7 from Chris Nighswonger <cnighswonger at foundations.edu> 2010-05-07 13:32:37 ---
>The initial perceived issue is that where return is a hash or array we're
>dereferencing -1 and crashing and burning
Right. I'm not arguing the validity of the bug.
However, in fixing this bug, we should not destroy the error trapping
capabilities of the code. Error trapping is something the entire code base is
badly in need of.
Hence my recommendation that we either:
a) do something like:
if ((ref($data) eq 'SCALAR') && ($data == -1)) {
return undef;
}
elsif ((ref($data) eq 'ARRAY') && (scalar(@$data) == 0)) {
return undef;
}
which would fix the problem and preserve error trapping in other portions of
code.
b) port changes to the return values of the methods to the error trapping code
higher up.
In any case, the fix should preserve error trapping higher up.
--
Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the Koha-bugs
mailing list