Browse Source

Show plugin name in error message if a plugin component was requested

ADmad 14 years ago
parent
commit
4b49a287a6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/Cake/Controller/ComponentCollection.php

+ 2 - 1
lib/Cake/Controller/ComponentCollection.php

@@ -98,7 +98,8 @@ class ComponentCollection extends ObjectCollection implements CakeEventListener
 		App::uses($componentClass, $plugin . 'Controller/Component');
 		if (!class_exists($componentClass)) {
 			throw new MissingComponentException(array(
-				'class' => $componentClass
+				'class' => $componentClass,
+				'plugin' => substr($plugin, 0, -1)
 			));
 		}
 		$this->_loaded[$alias] = new $componentClass($this, $settings);