Skip to content
This repository
Browse code

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
Mark Story markstory authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 cake/libs/controller/controller.php
14 cake/libs/controller/controller.php
@@ -947,17 +947,17 @@ function paginate($object = null, $scope = array(), $whitelist = array()) {
947 947 }
948 948
949 949 if ($assoc && isset($this->{$object}->{$assoc})) {
950   - $object = $this->{$object}->{$assoc};
  950 + $object =& $this->{$object}->{$assoc};
951 951 } elseif ($assoc && isset($this->{$this->modelClass}) && isset($this->{$this->modelClass}->{$assoc})) {
952   - $object = $this->{$this->modelClass}->{$assoc};
  952 + $object =& $this->{$this->modelClass}->{$assoc};
953 953 } elseif (isset($this->{$object})) {
954   - $object = $this->{$object};
  954 + $object =& $this->{$object};
955 955 } elseif (isset($this->{$this->modelClass}) && isset($this->{$this->modelClass}->{$object})) {
956   - $object = $this->{$this->modelClass}->{$object};
  956 + $object =& $this->{$this->modelClass}->{$object};
957 957 }
958 958 } elseif (empty($object) || $object === null) {
959 959 if (isset($this->{$this->modelClass})) {
960   - $object = $this->{$this->modelClass};
  960 + $object =& $this->{$this->modelClass};
961 961 } else {
962 962 $className = null;
963 963 $name = $this->uses[0];
@@ -965,9 +965,9 @@ function paginate($object = null, $scope = array(), $whitelist = array()) {
965 965 list($name, $className) = explode('.', $this->uses[0]);
966 966 }
967 967 if ($className) {
968   - $object = $this->{$className};
  968 + $object =& $this->{$className};
969 969 } else {
970   - $object = $this->{$name};
  970 + $object =& $this->{$name};
971 971 }
972 972 }
973 973 }

0 comments on commit 401796e

Please sign in to comment.
Something went wrong with that request. Please try again.