Browse Source

Use instanceof instead of is_a() in Controller.php

Bryan Crowe 12 years ago
parent
commit
1393325ad1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Controller/Controller.php

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

@@ -940,7 +940,7 @@ class Controller extends Object implements CakeEventListener {
 		$models = ClassRegistry::keys();
 		foreach ($models as $currentModel) {
 			$currentObject = ClassRegistry::getObject($currentModel);
-			if (is_a($currentObject, 'Model')) {
+			if ($currentObject instanceof Model) {
 				$className = get_class($currentObject);
 				list($plugin) = pluginSplit(App::location($className));
 				$this->request->params['models'][$currentObject->alias] = compact('plugin', 'className');