ソースを参照

[ZF-11570] Zend_Tool

- Fixed notice by undefined variable.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24257 44c647ce-9c0f-0410-b52a-842ac1e357ba
ramon 14 年 前
コミット
0d61a6afe5
1 ファイル変更8 行追加7 行削除
  1. 8 7
      library/Zend/Tool/Project/Provider/Action.php

+ 8 - 7
library/Zend/Tool/Project/Provider/Action.php

@@ -134,11 +134,11 @@ class Zend_Tool_Project_Provider_Action
         // get request/response object
         $request = $this->_registry->getRequest();
         $response = $this->_registry->getResponse();
-        
+
         // determine if testing is enabled in the project
         require_once 'Zend/Tool/Project/Provider/Test.php';
         $testingEnabled = Zend_Tool_Project_Provider_Test::isTestingEnabled($this->_loadedProfile);
-        
+
         if ($testingEnabled && !Zend_Tool_Project_Provider_Test::isPHPUnitAvailable()) {
             $testingEnabled = false;
             $response->appendContent(
@@ -146,7 +146,7 @@ class Zend_Tool_Project_Provider_Action
                 array('color' => array('yellow'))
                 );
         }
-        
+
         // Check that there is not a dash or underscore, return if doesnt match regex
         if (preg_match('#[_-]#', $name)) {
             throw new Zend_Tool_Project_Provider_Exception('Action names should be camel cased.');
@@ -167,6 +167,7 @@ class Zend_Tool_Project_Provider_Action
 
         $actionMethodResource = self::createResource($this->_loadedProfile, $name, $controllerName, $module);
 
+        $testActionMethodResource = null;
         if ($testingEnabled) {
             $testActionMethodResource = Zend_Tool_Project_Provider_Test::createApplicationResource($this->_loadedProfile, $controllerName, $name, $module);
         }
@@ -199,23 +200,23 @@ class Zend_Tool_Project_Provider_Action
                 'Would create an action named ' . $name .
                 ' inside controller at ' . $actionMethodResource->getParentResource()->getContext()->getPath()
                 );
-                
+
             if ($testActionMethodResource) {
                 $response->appendContent('Would create an action test in ' . $testActionMethodResource->getParentResource()->getContext()->getPath());
             }
-                
+
         } else {
             $response->appendContent(
                 'Creating an action named ' . $name .
                 ' inside controller at ' . $actionMethodResource->getParentResource()->getContext()->getPath()
                 );
             $actionMethodResource->create();
-            
+
             if ($testActionMethodResource) {
                 $response->appendContent('Creating an action test in ' . $testActionMethodResource->getParentResource()->getContext()->getPath());
                 $testActionMethodResource->create();
             }
-            
+
             $this->_storeProfile();
         }