mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Simplifying code
This commit is contained in:
parent
84538ac10a
commit
228230e67b
1 changed files with 2 additions and 2 deletions
|
@ -521,8 +521,8 @@ class Controller extends Object {
|
|||
$this->__mergeVars();
|
||||
$this->Components->init($this);
|
||||
if ($this->uses) {
|
||||
$this->uses = $uses = is_array($this->uses) ? $this->uses : array($this->uses);
|
||||
list(, $this->modelClass) = pluginSplit($uses[0]);
|
||||
$this->uses = (array) $this->uses;
|
||||
list(, $this->modelClass) = pluginSplit(current($this->uses));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue