From: Michael J. Rubinsky Date: Fri, 13 Nov 2009 14:30:30 +0000 (-0500) Subject: Only destroy the session if we are actually running via the cli. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=778778570869506ccec9470e15ba9f79c06912d0;p=horde.git Only destroy the session if we are actually running via the cli. Bug: 8482 and also resolves Bug: 8701 --- 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')); + } } /**