From 2b24e36191919f1f4be1c9e095a0795fdef43341 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 23 Mar 2012 09:54:25 +0100 Subject: [PATCH] Bug 7810 - C4/Auth.pm - on plack restart session is undefined 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. Signed-off-by: Jared Camins-Esakov Solved the problem when my Plack installation started acting up due to stale cookies. Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 4959f7b99f..97ff3d4599 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; -- 2.39.5