Software error: Can't call method "branches" on an undefined value at kohaclone/admin/patron-attr-types.pl line 300. For help, please send mail to the webmaster (webmaster@mybox), giving this error message and the time and date of the error.
Created attachment 16245 [details] [review] proposed patch
Its a typo all right but fetch can also return undef shouldn't we also check for that??
Does this cause a problem which can be reproduced? Can the outcome be tested?
Patch tested with a sandbox, by Cedric Vita <cedric.vita@dracenie.com>
Created attachment 16585 [details] [review] bug 9835: Lack of brackets in patron-attr-types.pl line 300 produces a warning 'Can't call method "branches" on an undefined value'... Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
I have seen the error on Brendan's installation, but can't reproduce right now - maybe someone else can?
I cannot reproduced. And I don't understand the patch. C4::Members::AttributeTypes has a branches method and it is the method we want to call. I would prefer: $attr->{branches} = $attr_type->branches if defined $attr_type; But at this place, $attr_type should be defined. Could you produce a test plan to reproduce the issue please?
I can only repeat this on my install and we have not been able to repeat this anywhere else - we have tried four other installs and I have tried other installs on other boxes. I think we can just disregard this bug until another person reports this problem. -Brendan