[Koha-patches] [PATCH] Bug 7810 - C4/Auth.pm - on pack restart session is undefined
Dobrica Pavlinusic
dpavlin at rot13.org
Fri Mar 23 09:58:39 CET 2012
So we shouldn't try to delete it. This produces application error
instead of redirection to login page.
I had similar problems with CGI, especially when session in browser
is still active, and one on filesystem or database is already expired.
---
C4/Auth.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index 0b737e7..8c15aa4 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -690,7 +690,7 @@ sub checkauth {
elsif ( $lasttime < time() - $timeout ) {
# timed logout
$info{'timed_out'} = 1;
- $session->delete();
+ $session->delete() if $session;
C4::Context->_unset_userenv($sessionID);
#_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime));
$userid = undef;
--
1.7.2.5
More information about the Koha-patches
mailing list