Browse Source

Merge pull request #548 from holtkamp/patch-session-validator-exceptions

Patch session validator exceptions
Frank Brückner 10 years ago
parent
commit
41009adf2f
2 changed files with 46 additions and 3 deletions
  1. 3 3
      library/Zend/Session.php
  2. 43 0
      library/Zend/Session/Validator/Exception.php

+ 3 - 3
library/Zend/Session.php

@@ -811,9 +811,9 @@ class Zend_Session extends Zend_Session_Abstract
             }
             $validator = new $validator_name;
             if ($validator->validate() === false) {
-                /** @see Zend_Session_Exception */
-                require_once 'Zend/Session/Exception.php';
-                throw new Zend_Session_Exception("This session is not valid according to {$validator_name}.");
+                /** @see Zend_Session_Validator_Exception */
+                require_once 'Zend/Session/Validator/Exception.php';
+                throw new Zend_Session_Validator_Exception("This session is not valid according to {$validator_name}.");
             }
         }
     }

+ 43 - 0
library/Zend/Session/Validator/Exception.php

@@ -0,0 +1,43 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Session
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ * @since      Preview Release 0.2
+ */
+
+
+/**
+ * @see Zend_Session_Exception
+ */
+require_once 'Zend/Session/Exception.php';
+
+
+/**
+ * Zend_Session_Validator_Exception
+ *
+ * @category   Zend
+ * @package    Zend_Session
+ * @subpackage Validator
+ * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Session_Validator_Exception extends Zend_Session_Exception
+{
+
+}
+