mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Remove PHP5 conditional statements.
This commit is contained in:
parent
c1eaa4b24c
commit
87db966383
1 changed files with 3 additions and 9 deletions
|
@ -594,15 +594,9 @@ class Controller extends Object {
|
||||||
if (($cached === false)) {
|
if (($cached === false)) {
|
||||||
$this->modelNames[] = $modelClass;
|
$this->modelNames[] = $modelClass;
|
||||||
|
|
||||||
if (!PHP5) {
|
|
||||||
$this->{$modelClass} =& ClassRegistry::init(array(
|
|
||||||
'class' => $plugin . $modelClass, 'alias' => $modelClass, 'id' => $id
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
$this->{$modelClass} = ClassRegistry::init(array(
|
$this->{$modelClass} = ClassRegistry::init(array(
|
||||||
'class' => $plugin . $modelClass, 'alias' => $modelClass, 'id' => $id
|
'class' => $plugin . $modelClass, 'alias' => $modelClass, 'id' => $id
|
||||||
));
|
));
|
||||||
}
|
|
||||||
|
|
||||||
if (!$this->{$modelClass}) {
|
if (!$this->{$modelClass}) {
|
||||||
return $this->cakeError('missingModel', array(array(
|
return $this->cakeError('missingModel', array(array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue