mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
adding a return false to cache and configure
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4285 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
d967e98ee1
commit
8eccba69ce
2 changed files with 5 additions and 2 deletions
|
@ -957,6 +957,8 @@
|
|||
}
|
||||
} else if(is_writable(dirname($filename))) {
|
||||
file_put_contents($filename, $data);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
|
|
@ -283,10 +283,11 @@ class Configure extends Object {
|
|||
*/
|
||||
function __writeConfig($content, $name, $write = true){
|
||||
$file = CACHE . 'persistent' . DS . $name . '.php';
|
||||
$cached = false;
|
||||
if(!file_exists($file)){
|
||||
cache('persistent' . DS . $name . '.php', "<?php\n\$config = array();\n");
|
||||
$cached = cache('persistent' . DS . $name . '.php', "<?php\n\$config = array();\n");
|
||||
}
|
||||
if($write === true){
|
||||
if($write === true && $cached){
|
||||
if(!class_exists('File')){
|
||||
uses('File');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue