Bug 9835 - Brackets missing for branches for patron attribute types
Summary: Brackets missing for branches for patron attribute types
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-18 13:47 UTC by Brendan Gallagher
Modified: 2014-12-07 20:02 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
proposed patch (1.03 KB, patch)
2013-03-18 14:08 UTC, Christophe Croullebois
Details | Diff | Splinter Review
bug 9835: Lack of brackets in patron-attr-types.pl line 300 (1.08 KB, patch)
2013-03-21 09:20 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Gallagher 2013-03-18 13:47:59 UTC
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.
Comment 1 Christophe Croullebois 2013-03-18 14:08:44 UTC Comment hidden (obsolete)
Comment 2 Colin Campbell 2013-03-18 16:28:06 UTC
Its a typo all right but fetch can also return undef shouldn't we also check for that??
Comment 3 Owen Leonard 2013-03-20 01:03:36 UTC
Does this cause a problem which can be reproduced? Can the outcome be tested?
Comment 4 Paul Poulain 2013-03-21 09:20:34 UTC
Patch tested with a sandbox, by Cedric Vita <cedric.vita@dracenie.com>
Comment 5 Paul Poulain 2013-03-21 09:20:51 UTC
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>
Comment 6 Katrin Fischer 2013-03-21 15:49:32 UTC
I have seen the error on Brendan's installation, but can't reproduce right now - maybe someone else can?
Comment 7 Jonathan Druart 2013-03-21 16:12:23 UTC
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?
Comment 8 Brendan Gallagher 2013-03-21 16:19:42 UTC
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