mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
fixes #4729, configure notice on cache path
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7007 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
340496079f
commit
8dc7515045
1 changed files with 10 additions and 12 deletions
|
@ -636,23 +636,21 @@ class Configure extends Object {
|
|||
|
||||
if ($_this->read('Cache.disable') !== true) {
|
||||
$cache = Cache::config('default');
|
||||
|
||||
|
||||
if (empty($cache['settings'])) {
|
||||
trigger_error('Cache not configured properly. Please check Cache::config(); in APP/config/core.php', E_USER_WARNING);
|
||||
list($engine, $cache) = Cache::config('default', array('engine' => 'File'));
|
||||
} else {
|
||||
$cache = $cache['settings'];
|
||||
$cache = Cache::config('default', array('engine' => 'File'));
|
||||
}
|
||||
|
||||
|
||||
$settings = array_merge($cache['settings'], array('prefix' => 'cake_core_', 'serialize' => true));
|
||||
|
||||
if (Configure::read() > 1) {
|
||||
$cache['duration'] = 10;
|
||||
$settings['duration'] = 10;
|
||||
}
|
||||
$settings = array(
|
||||
'prefix' => 'cake_core_',
|
||||
'path' => realpath($cache['path'].DS.'persistent').DS,
|
||||
'serialize' => true
|
||||
);
|
||||
$config = Cache::config('_cake_core_' , array_merge($cache, $settings));
|
||||
if (!empty($cache['path'])) {
|
||||
$settings['path'] = realpath($cache['path'] . DS . 'persistent') . DS;
|
||||
}
|
||||
Cache::config('_cake_core_' , $settings);
|
||||
}
|
||||
}
|
||||
if (empty($_this->modelPaths)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue