Only destroy the session if we are actually running via the cli.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 13 Nov 2009 14:30:30 +0000 (09:30 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 13 Nov 2009 14:30:30 +0000 (09:30 -0500)
Bug: 8482 and also resolves Bug: 8701

framework/Cli/lib/Horde/Cli.php

index 875b74c..a47d71d 100644 (file)
@@ -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'));
+        }
     }
 
     /**