mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding missing reference operators in Controller::paginate().
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8277 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
29dd4ddf03
commit
401796e1a9
1 changed files with 7 additions and 7 deletions
|
@ -947,17 +947,17 @@ class Controller extends Object {
|
|||
}
|
||||
|
||||
if ($assoc && isset($this->{$object}->{$assoc})) {
|
||||
$object = $this->{$object}->{$assoc};
|
||||
$object =& $this->{$object}->{$assoc};
|
||||
} elseif ($assoc && isset($this->{$this->modelClass}) && isset($this->{$this->modelClass}->{$assoc})) {
|
||||
$object = $this->{$this->modelClass}->{$assoc};
|
||||
$object =& $this->{$this->modelClass}->{$assoc};
|
||||
} elseif (isset($this->{$object})) {
|
||||
$object = $this->{$object};
|
||||
$object =& $this->{$object};
|
||||
} elseif (isset($this->{$this->modelClass}) && isset($this->{$this->modelClass}->{$object})) {
|
||||
$object = $this->{$this->modelClass}->{$object};
|
||||
$object =& $this->{$this->modelClass}->{$object};
|
||||
}
|
||||
} elseif (empty($object) || $object === null) {
|
||||
if (isset($this->{$this->modelClass})) {
|
||||
$object = $this->{$this->modelClass};
|
||||
$object =& $this->{$this->modelClass};
|
||||
} else {
|
||||
$className = null;
|
||||
$name = $this->uses[0];
|
||||
|
@ -965,9 +965,9 @@ class Controller extends Object {
|
|||
list($name, $className) = explode('.', $this->uses[0]);
|
||||
}
|
||||
if ($className) {
|
||||
$object = $this->{$className};
|
||||
$object =& $this->{$className};
|
||||
} else {
|
||||
$object = $this->{$name};
|
||||
$object =& $this->{$name};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue