Bugzilla – Attachment 12458 Details for
Bug 8804
Quiet errors in the log from Auth.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8804 - Quiet errors in the log from Auth.pm
SIGNED-OFF-Bug-8804---Quiet-errors-in-the-log-from.patch (text/plain), 2.48 KB, created by
Marc Véron
on 2012-09-23 19:12:36 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8804 - Quiet errors in the log from Auth.pm
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2012-09-23 19:12:36 UTC
Size:
2.48 KB
patch
obsolete
>From 15ab755c4704b50822c6a2f0064fefaa5017b61e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 21 Sep 2012 16:49:51 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 8804 - Quiet errors in the log from Auth.pm >Content-Type: text/plain; charset="utf-8" > >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. > >Signed-off-by: Marc Veron <veron@veron.ch> > >I could reproduce both errors with the staff client, not with the Opac. > >After applying the patch no more log entries regarding line 705 and line 384, so I sign off this patch. > >However I had one more similar log entry (with and without patch) that could be addressed in a follow up: > >mainpage.pl: Use of uninitialized value $pki_field in string eq at (...)/C4/Auth.pm line 736., referer: http://(...) >--- > C4/Auth.pm | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 5486f76..90de92c 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -381,7 +381,7 @@ sub get_template_and_user { > my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'}; > my $opac_limit_override = $ENV{'OPAC_LIMIT_OVERRIDE'}; > my $opac_name = ''; >- if (($opac_search_limit =~ /branch:(\w+)/ && $opac_limit_override) || $in->{'query'}->param('limit') =~ /branch:(\w+)/){ >+ if ((($opac_search_limit && $opac_search_limit =~ /branch:(\w+)/) && $opac_limit_override) || ($in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /branch:(\w+)/)){ > $opac_name = $1; # opac_search_limit is a branch, so we use it. > } elsif (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv && C4::Context->userenv->{'branch'}) { > $opac_name = C4::Context->userenv->{'branch'}; >@@ -702,7 +702,7 @@ sub checkauth { > else { > $cookie = $query->cookie( CGISESSID => $session->id ); > $session->param('lasttime',time()); >- unless ( $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... >+ unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... > $flags = haspermission($userid, $flagsrequired); > if ($flags) { > $loggedin = 1; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8804
:
12450
|
12458
|
13075
|
13183