From ab7bf5a46c3b6fbb4691d347bfffdfc05e4a9153 Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 9 Mar 2008 07:00:05 +0000 Subject: [PATCH] Fixing call-time pass-by-ref errors in Behavior git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6533 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/behavior.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/model/behavior.php b/cake/libs/model/behavior.php index 257886590..112c8843f 100644 --- a/cake/libs/model/behavior.php +++ b/cake/libs/model/behavior.php @@ -153,7 +153,7 @@ class ModelBehavior extends Object { */ function dispatchMethod(&$model, $method, $params = array()) { if (empty($params)) { - return $this->{$method}(&$model); + return $this->{$method}($model); } $params = array_values($params); @@ -169,7 +169,7 @@ class ModelBehavior extends Object { case 5: return $this->{$method}($model, $params[0], $params[1], $params[2], $params[3], $params[4]); default: - array_unshift($params, &$model); + array_unshift($params, $model); return call_user_func_array(array(&$this, $method), $params); break; } @@ -438,7 +438,7 @@ class BehaviorCollection extends Object { if (in_array($name, $this->_disabled)) { continue; } - $result = $this->{$name}->dispatchMethod(&$model, $callback, $params); + $result = $this->{$name}->dispatchMethod($model, $callback, $params); if ($options['break'] && ($result === $options['breakOn'] || is_array($options['breakOn'] && in_array($result, $options['breakOn'], true)))) { return $result;