Permalink
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...
1 parent 29dd4dd commit 401796e1a965982d086c1c33d72554dbad8d3f99 @markstory markstory committed Aug 3, 2009
Showing with 7 additions and 7 deletions.
  1. +7 −7 cake/libs/controller/controller.php
@@ -947,27 +947,27 @@ 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];
if (strpos($this->uses[0], '.') !== false) {
list($name, $className) = explode('.', $this->uses[0]);
}
if ($className) {
- $object = $this->{$className};
+ $object =& $this->{$className};
} else {
- $object = $this->{$name};
+ $object =& $this->{$name};
}
}
}

0 comments on commit 401796e

Please sign in to comment.