Remove PHP5 conditional statements.

This commit is contained in:
predominant 2010-05-03 13:36:32 +10:00
parent c1eaa4b24c
commit 87db966383

View file

@ -594,15 +594,9 @@ class Controller extends Object {
if (($cached === false)) {
$this->modelNames[] = $modelClass;
if (!PHP5) {
$this->{$modelClass} =& ClassRegistry::init(array(
'class' => $plugin . $modelClass, 'alias' => $modelClass, 'id' => $id
));
} else {
$this->{$modelClass} = ClassRegistry::init(array(
'class' => $plugin . $modelClass, 'alias' => $modelClass, 'id' => $id
));
}
$this->{$modelClass} = ClassRegistry::init(array(
'class' => $plugin . $modelClass, 'alias' => $modelClass, 'id' => $id
));
if (!$this->{$modelClass}) {
return $this->cakeError('missingModel', array(array(