diff --git a/cake/libs/model/behaviors/acl.php b/cake/libs/model/behaviors/acl.php index 8bc2c39696a..a103c500829 100644 --- a/cake/libs/model/behaviors/acl.php +++ b/cake/libs/model/behaviors/acl.php @@ -53,7 +53,11 @@ function setup(&$model, $config = array()) { if (!class_exists('AclNode')) { require LIBS . 'model' . DS . 'db_acl.php'; } - $model->{$type} =& ClassRegistry::init($type); + if (PHP5) { + $model->{$type} = ClassRegistry::init($type); + } else { + $model->{$type} =& ClassRegistry::init($type); + } if (!method_exists($model, 'parentNode')) { trigger_error("Callback parentNode() not defined in {$model->alias}", E_USER_WARNING); }