Procházet zdrojové kódy

ZF-8354: added check if file exists

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19092 44c647ce-9c0f-0410-b52a-842ac1e357ba
bate před 16 roky
rodič
revize
a2f38561e6
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      library/Zend/Controller/Dispatcher/Standard.php

+ 3 - 1
library/Zend/Controller/Dispatcher/Standard.php

@@ -335,7 +335,9 @@ class Zend_Controller_Dispatcher_Standard extends Zend_Controller_Dispatcher_Abs
         $dispatchDir = $this->getDispatchDirectory();
         $loadFile    = $dispatchDir . DIRECTORY_SEPARATOR . $this->classToFilename($className);
 
-        if (!include_once $loadFile) {
+        if (file_exists($loadFile)) {
+            include_once $loadFile;
+        } else {
             require_once 'Zend/Controller/Dispatcher/Exception.php';
             throw new Zend_Controller_Dispatcher_Exception('Cannot load controller class "' . $className . '" from file "' . $loadFile . "'");
         }