Currently line reads: my $circcontrol = C4::Context::preference('CircControl'); This fails to pass $self, which means the line: my $var = lc(shift); # The system preference to return which is in C4::Context.pm (sub preference) triggers the following error log entry: [Thu Sep 27 12:23:16 2012] [error] [client 192.168.100.2] [Thu Sep 27 12:23:16 2012] renewscript.pl: Use of uninitialized value in lc at /usr/share/koha/lib/C4/Context.pm line 529. This of course was particularly confusing because the problem is neither in renewscript.pl or Context.pm, but rather Circulation.pm. This error happens to be in 'sub _debar_user_on_return', which may mean it may or may not affect other user debarred on return bugs. That wasn't what I'm testing for in this bug. This does not exist in 3.6.x. This was discovered in 3.8.5. This exists in 3.8.x and master.
Created attachment 12542 [details] [review] Change :: to -> to correctly call C4::Context->preference Test ------ 1) Login in to staff client. 2) In search area, click 'Search Patrons' tab. 3) In search area text box, type a library name 4) Press Enter or Click the 'Submit' button 5) On the Left click the 'Check out' tab. 6) There should now be a list of checked out items. Check one of the 'Check In' checkboxes. Hopefully you have multiple items. 7) Add a Renewal Date. 8) Click the 'Renew or Return checked items' button. 9) check the intranet error log file. There should be something like: [Thu Sep 27 12:34:22 2012] [error] [client 192.168.100.2] [Thu Sep 27 12:34:22 2012] renewscript.pl: Use of uninitialized value in lc at /usr/share/koha/lib/C4/Context.pm line 529. 10) Apply patch 11) Check another one of the 'Check In' checkboxes. 12) Add a Renewal Date. 13) Click the 'Renew or Return checked items' button. 14) check the intranet error log file. The error should not appear. See also bug 8251, as if you have applied that patch before this one, it will not likely apply.
Actually, if it bug 8251 has already been pushed, the patch should apply fine. I just did this up from the latest master, and tested applying against the latest 3.8.x.
This is not an enhancement. Changed severity to normal.
Created attachment 12768 [details] [review] [SIGNED-OFF] Bug 8834 - Call to C4::Context::preference fails to pass $self in Circulation.pm Changed: my $circcontrol = C4::Context::preference('CircControl'); To: my $circcontrol = C4::Context->preference('CircControl'); This will pass $self and 'CircControl' which will then prevent a "Use of uninitialized value" error log entry. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
QA comment: tiny and obvious patch passed QA
Patch pushed to master
Pushed to 3.8.x will be in 3.8.7