From 1393325ad175decadb82ee5f708d4a70dab7d612 Mon Sep 17 00:00:00 2001 From: Bryan Crowe Date: Mon, 23 Sep 2013 21:37:27 -0400 Subject: [PATCH] Use instanceof instead of is_a() in Controller.php --- lib/Cake/Controller/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index 13d36328c..eb54a385a 100644 --- a/lib/Cake/Controller/Controller.php +++ b/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');