From 91bf568114b3181f340d29e6491ea0008ae9694f 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 --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 3cfc69fbae..c97046a1ec 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