From 778778570869506ccec9470e15ba9f79c06912d0 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Fri, 13 Nov 2009 09:30:30 -0500 Subject: [PATCH] Only destroy the session if we are actually running via the cli. Bug: 8482 and also resolves Bug: 8701 --- framework/Cli/lib/Horde/Cli.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/Cli/lib/Horde/Cli.php b/framework/Cli/lib/Horde/Cli.php index 875b74cb4..a47d71d03 100644 --- a/framework/Cli/lib/Horde/Cli.php +++ b/framework/Cli/lib/Horde/Cli.php @@ -184,7 +184,9 @@ class Horde_Cli // We really want to call this at the end of the script, not in the // destructor. - register_shutdown_function(array($this, 'shutdown')); + if ($this->_console) { + register_shutdown_function(array($this, '_shutdown')); + } } /** -- 2.11.0