Bug 8804 - Quiet errors in the log from Auth.pm
Summary: Quiet errors in the log from Auth.pm
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Mason James
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-21 20:50 UTC by Owen Leonard
Modified: 2013-12-05 20:01 UTC (History)
4 users (show)

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


Attachments
Bug 8804 - Quiet errors in the log from Auth.pm (2.03 KB, patch)
2012-09-21 21:02 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8804 - Quiet errors in the log from Auth.pm (2.48 KB, patch)
2012-09-23 19:12 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 8804 [Revised] Quiet errors in the log from Auth.pm (2.08 KB, patch)
2012-10-26 14:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 8804 [Revised] Quiet errors in the log from Auth.pm (2.11 KB, patch)
2012-11-01 19:46 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2012-09-21 20:50:10 UTC
Use of uninitialized value $sessiontype in string eq at C4/Auth.pm line 705.
Use of uninitialized value $opac_search_limit in pattern match (m//) at C4/Auth.pm line 384.
Use of uninitialized value in pattern match (m//) at C4/Auth.pm line 384.
Comment 1 Owen Leonard 2012-09-21 21:02:29 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2012-09-23 19:12:36 UTC Comment hidden (obsolete)
Comment 3 Mason James 2012-10-04 01:25:18 UTC
(In reply to comment #2)
> Created attachment 12458 [details] [review]
> [SIGNED-OFF] Bug 8804 - Quiet errors in the log from Auth.pm
> 
> Signed-off-by: Marc Veron <veron@veron.ch>
> 

trivial patch, passing QA...

$ koha-qa.pl -c 1

testing 1 commit(s) (applied to commit 6c18204)
 * 445bcca Bug 8804 - Quiet errors in the log from Auth.pm
      C4/Auth.pm

* C4/Auth.pm                                                               OK
Comment 4 Paul Poulain 2012-10-08 15:07:02 UTC
QA comment:
OK, i'm a little bit excessive, but that's what QA is made for ;-)

Unless i'm mistaking, there is a useless ()
+        if ((($opac_search_limit && $opac_search_limit =~ /branch:(\w+)/) && $opac_limit_override) || ($in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /branch:(\w+)/)){

can be written
+        if (($opac_search_limit && $opac_search_limit =~ /branch:(\w+)/ && $opac_limit_override) || ($in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /branch:(\w+)/)){

=> if ((A && B && C) || (D && E))
am I right ? If yes, please fix & resubmit
Comment 5 Owen Leonard 2012-10-26 14:42:54 UTC Comment hidden (obsolete)
Comment 6 Jared Camins-Esakov 2012-11-01 19:46:58 UTC Comment hidden (obsolete)
Comment 7 Jared Camins-Esakov 2012-11-01 19:47:59 UTC
As Marc says, there are a few other warnings, but this patch does not claim to fix them.
Comment 8 Mason James 2012-11-01 20:21:11 UTC
(In reply to comment #6)
> Created attachment 13183 [details] [review]
> Bug 8804 [Revised] Quiet errors in the log from Auth.pm
> 
> Found three cases where variables were being
> referenced which did not (in each case) exist. Adding
> checks for those variables' existence.
> 
> Errors appeared when logged in and viewing a detail
> page in the OPAC.
> 
> Revision simplifies logic as per RM suggestion.
> 
> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>


patch works as expected, passing QA...

$ koha-qa.pl  -c 1

testing 1 commit(s) (applied to commit ea72919)
 * 3460a37 Bug 8804 [Revised] Quiet errors in the log from Auth.pm
      C4/Auth.pm

* C4/Auth.pm                                                               OK
Comment 9 Jared Camins-Esakov 2012-11-01 21:07:53 UTC
This patch has been pushed to master.
Comment 10 Paul Poulain 2012-11-01 21:48:59 UTC
Patch pushed to branch 3.10.x
Comment 11 Chris Cormack 2012-11-02 17:14:25 UTC
Pushed to 3.8.x will be in 3.8.7