Browse Source

Fix failing tests caused by changes in App::objects()

mark_story 14 years ago
parent
commit
cfe38985cf

+ 1 - 0
lib/Cake/Console/Command/CommandListShell.php

@@ -85,6 +85,7 @@ class CommandListShell extends Shell {
 		$shellList = $this->_appendShells('CORE', $shells, $shellList);
 
 		$appShells = App::objects('Console/Command', null, false);
+		$appShells = array_diff($appShells, $shells);
 		$shellList = $this->_appendShells('app', $appShells, $shellList);
 
 		$plugins = CakePlugin::loaded();

+ 3 - 0
lib/Cake/Console/Command/Task/ExtractTask.php

@@ -353,6 +353,9 @@ class ExtractTask extends Shell {
 		foreach ($models as $model) {
 			App::uses($model, $plugin . 'Model');
 			$reflection = new ReflectionClass($model);
+			if (!$reflection->isSubClassOf('Model')) {
+				continue;
+			}
 			$properties = $reflection->getDefaultProperties();
 			$validate = $properties['validate'];
 			if (empty($validate)) {