Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 401796e1a965982d086c1c33d72554dbad8d3f99 1 parent 29dd4dd
@markstory markstory authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 cake/libs/controller/controller.php
View
14 cake/libs/controller/controller.php
@@ -947,17 +947,17 @@ function paginate($object = null, $scope = array(), $whitelist = array()) {
}
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 @@ function paginate($object = null, $scope = array(), $whitelist = array()) {
list($name, $className) = explode('.', $this->uses[0]);
}
if ($className) {
- $object = $this->{$className};
+ $object =& $this->{$className};
} else {
- $object = $this->{$name};
+ $object =& $this->{$name};
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.