diff options
-rw-r--r-- | libs/Zend/Session.php | 4 | ||||
-rw-r--r-- | libs/Zend/Session/Exception.php | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php index 38c8a1ba86..73668507aa 100644 --- a/libs/Zend/Session.php +++ b/libs/Zend/Session.php @@ -479,14 +479,14 @@ class Zend_Session extends Zend_Session_Abstract restore_error_handler(); } - if (!$startedCleanly || Zend_Session_Exception::$sessionStartError != null) { + if (!$startedCleanly || !empty(Zend_Session_Exception::$sessionStartError)) { if (self::$_throwStartupExceptions) { set_error_handler(array('Zend_Session_Exception', 'handleSilentWriteClose'), $errorLevel); } session_write_close(); if (self::$_throwStartupExceptions) { restore_error_handler(); - throw new Zend_Session_Exception(__CLASS__ . '::' . __FUNCTION__ . '() - ' . Zend_Session_Exception::$sessionStartError); + throw new Zend_Session_Exception(__CLASS__ . '::' . __FUNCTION__ . '() - ' . Zend_Session_Exception::$sessionStartError . ' Warnings: ' . Zend_Session_Exception::$sessionStartWarning); } } } diff --git a/libs/Zend/Session/Exception.php b/libs/Zend/Session/Exception.php index 734e2c45f9..b1ce8fc6ac 100644 --- a/libs/Zend/Session/Exception.php +++ b/libs/Zend/Session/Exception.php @@ -43,7 +43,8 @@ class Zend_Session_Exception extends Zend_Exception * @see http://framework.zend.com/issues/browse/ZF-1325 * @var string PHP Error Message */ - static public $sessionStartError = null; + static public $sessionStartError = ''; + static public $sessionStartWarning = ''; /** * handleSessionStartError() - interface for set_error_handler() @@ -55,10 +56,12 @@ class Zend_Session_Exception extends Zend_Exception */ static public function handleSessionStartError($errno, $errstr, $errfile, $errline, $errcontext) { - if (!isset(self::$sessionStartError)) { - self::$sessionStartError = ''; + $message = $errfile . '(Line:' . $errline . '): Error #' . $errno . ' ' . $errstr; + if (E_ERROR === $errno || E_CORE_ERROR === $errno || E_COMPILE_ERROR === $errno) { + self::$sessionStartError .= $message . ' '; + } else { + self::$sessionStartWarning .= $message . ' '; } - self::$sessionStartError .= $errfile . '(Line:' . $errline . '): Error #' . $errno . ' ' . $errstr . ' '; } /** |