[Koha-bugs] [Bug 28700] "Unblessed" method in Object.pm has blessed values for keys in some cases

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 18 12:09:49 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28700

--- Comment #21 from Andrew Nugged <nugged at gmail.com> ---
(In reply to Jonathan Druart from comment #17)
> Created attachment 126082 [details] [review]

This is beside main discussion (I still not yet formed up my opinion on this),
but to fix last patch bug:

      if ref($infos) !~ /HASH|ARRAY/ && $infos->isa('Koha::Object');

should be:

      if ref($infos) !~ /HASH|ARRAY|^$/ && $infos->isa('Koha::Object');

or (whatever is more elegant):

      if ref($infos) && ref($infos) !~ /HASH|ARRAY/ &&
$infos->isa('Koha::Object');

this is to prevent to walk to $infos->isa when there is ref "", i.e. scalar in
$infos.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list