Jelajahi Sumber

ZF-10252
Fixed Zend_Tool generated error controller to check to see if the error handler is present


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22872 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph 15 tahun lalu
induk
melakukan
01629e1ce3
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      library/Zend/Tool/Project/Context/Zf/ControllerFile.php

+ 5 - 0
library/Zend/Tool/Project/Context/Zf/ControllerFile.php

@@ -134,6 +134,11 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
                                 'body' => <<<EOS
 \$errors = \$this->_getParam('error_handler');
 
+if (!\$errors) {
+    \$this->view->message = 'You have reached the error page';
+    return;
+}
+
 switch (\$errors->type) {
     case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
     case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: