Merge pull request #1669 from bcrowe/hotfix-instancecheck

Use instanceof instead of is_a() in Controller.php
This commit is contained in:
Mark Story 2013-09-23 18:51:46 -07:00
commit af368132a5

View file

@ -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');