Permalink
Browse files

Use instanceof instead of is_a() in Controller.php

  • Loading branch information...
1 parent a30f861 commit 1393325ad175decadb82ee5f708d4a70dab7d612 @bcrowe bcrowe committed Sep 24, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Controller/Controller.php
@@ -940,7 +940,7 @@ public function render($view = null, $layout = null) {
$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');

0 comments on commit 1393325

Please sign in to comment.