mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-17 06:59:51 +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
|
@ -639,20 +639,18 @@ class Configure extends Object {
|
||||||
|
|
||||||
if (empty($cache['settings'])) {
|
if (empty($cache['settings'])) {
|
||||||
trigger_error('Cache not configured properly. Please check Cache::config(); in APP/config/core.php', E_USER_WARNING);
|
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'));
|
$cache = Cache::config('default', array('engine' => 'File'));
|
||||||
} else {
|
|
||||||
$cache = $cache['settings'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$settings = array_merge($cache['settings'], array('prefix' => 'cake_core_', 'serialize' => true));
|
||||||
|
|
||||||
if (Configure::read() > 1) {
|
if (Configure::read() > 1) {
|
||||||
$cache['duration'] = 10;
|
$settings['duration'] = 10;
|
||||||
}
|
}
|
||||||
$settings = array(
|
if (!empty($cache['path'])) {
|
||||||
'prefix' => 'cake_core_',
|
$settings['path'] = realpath($cache['path'] . DS . 'persistent') . DS;
|
||||||
'path' => realpath($cache['path'].DS.'persistent').DS,
|
}
|
||||||
'serialize' => true
|
Cache::config('_cake_core_' , $settings);
|
||||||
);
|
|
||||||
$config = Cache::config('_cake_core_' , array_merge($cache, $settings));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($_this->modelPaths)) {
|
if (empty($_this->modelPaths)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue