diff --git a/cake/libs/configure.php b/cake/libs/configure.php index a9ee31d4e..1e1b6349d 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -588,14 +588,14 @@ class Configure extends Object { $cache = Cache::settings(); if(empty($cache)) { trigger_error('Cache not configured properly. Please check Cache::config(); in APP/config/core.php', E_USER_WARNING); - Cache::config('default', array('engine' => 'File')); - $cache = Cache::settings(); + list($engine, $cache) = Cache::config('default', array('engine' => 'File')); } - $settings = array('prefix' => 'cake_core_', 'path' => CACHE . 'persistent' . DS); if (Configure::read() > 1) { - $settings = array('prefix' => 'cake_core_', 'duration' => 10, 'path' => CACHE . 'persistent' . DS); + $cache['duration'] = 10; } - Cache::config('_cake_core_' , array_merge($cache, $settings)); + + $settings = array('prefix' => 'cake_core_', 'path' => CACHE . 'persistent' . DS, 'serialize' => true); + $config = Cache::config('_cake_core_' , array_merge($cache, $settings)); } } diff --git a/cake/libs/model/db_acl.php b/cake/libs/model/db_acl.php index 3eba5ee9c..22a757305 100644 --- a/cake/libs/model/db_acl.php +++ b/cake/libs/model/db_acl.php @@ -125,15 +125,18 @@ class AclNode extends AppModel { $ref = array('model' => $ref->alias, 'foreign_key' => $ref->id); } elseif (is_array($ref) && !(isset($ref['model']) && isset($ref['foreign_key']))) { $name = key($ref); - if (!ClassRegistry::isKeySet($name)) { - if (!App::import($name)) { - trigger_error("Model class '$name' not found in AclNode::node() when trying to bind {$this->alias} object", E_USER_WARNING); - return null; - } - $model =& ClassRegistry::init(array('class' => $name, 'alias' => $name)); + + if(PHP5) { + $model = ClassRegistry::init(array('class' => $name, 'alias' => $name)); } else { - $model =& ClassRegistry::getObject($name); + $model =& ClassRegistry::init(array('class' => $name, 'alias' => $name)); } + + if (empty($model)) { + trigger_error("Model class '$name' not found in AclNode::node() when trying to bind {$this->alias} object", E_USER_WARNING); + return null; + } + $tmpRef = null; if (method_exists($model, 'bindNode')) { $tmpRef = $model->bindNode($ref);