https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26587
--- Comment #11 from David Cook <[email protected]> --- Hey Björn, have you tested these patches? I haven't tested them, but at a glance it looks like they contain errors. 1) For instance, in the first one, $av_cache doesn't look like it's declared anywhere. I think that will probably throw a fatal error (or at best a warning). You should be declaring that before the loop in GetItemsInfo. You're also using fairly deep hash structures which could break. For instance: $av_cache->{$data->{frameworkcode}}->{'items.stack'}->{$data->{stack}}->{lib} = $data->{stack}; If $data->{frameworkcode} or more likely $data->{stack} don't exist , then you're going to probably get a fatal error. You might want to wrap some of this cache code in a function with more checks/conditions in it. 2) I think that the second patch will generate either fatal errors or warnings as well since you're not testing for the existence of $self->{branches} before tyring $self->{branches}->{$branchcode}. You can either create $self->{branches} in a "sub new" function or just test for it first. Something like "$self->{branches} = {} unless $self->{branches}". Then You can test for $self->{branches}->{$branchcode} because you've initialized $self->{branches} as a hashref. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
