mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 02:52:41 +00:00
Adding addslashes() to Configure::store() so content will have backslashes before characters that need to be quoted.
Removed error notice that is thrown when file is not present git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4284 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ea7ae19849
commit
d967e98ee1
1 changed files with 2 additions and 1 deletions
|
@ -215,7 +215,6 @@ class Configure extends Object {
|
|||
} elseif (file_exists(CACHE . 'persistent' . DS . $fileName . '.php')) {
|
||||
include(CACHE . 'persistent' . DS . $fileName . '.php');
|
||||
} else {
|
||||
trigger_error(sprintf(__("Configure::load() - %s.php not found", true), $fileName), E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -259,9 +258,11 @@ class Configure extends Object {
|
|||
$content .= "\$config['$type']['$key'] = array(";
|
||||
if(is_array($value)){
|
||||
foreach($value as $key1 => $value2){
|
||||
$value2 = addslashes($value2);
|
||||
$content .= "'$key1' => '$value2', ";
|
||||
}
|
||||
} else {
|
||||
$value = addslashes($value);
|
||||
$content .= "'$key' => '$value'";
|
||||
}
|
||||
$content .= ");\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue