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:
gwoo 2007-01-12 16:37:56 +00:00
parent d967e98ee1
commit 8eccba69ce
2 changed files with 5 additions and 2 deletions

View file

@ -957,6 +957,8 @@
}
} else if(is_writable(dirname($filename))) {
file_put_contents($filename, $data);
} else {
return false;
}
return $data;
}

View file

@ -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');
}