Fixed #139 using var_export; thank you @janpieper and @evert
Former-commit-id: c0f5275e88
This commit is contained in:
parent
8be1bf533f
commit
74a38c7e2b
1 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ abstract class Config extends \Flake\Core\Model\NoDb {
|
|||
# We replace value by it's native PHP notation
|
||||
switch($this->aConstants[$prop]["type"]) {
|
||||
case "string": {
|
||||
$sValue = '"' . addcslashes($sValue, "\"\\\0\n\r") . '"'; # Add quotes, and escape " and all string-termination chars
|
||||
$sValue = var_export($sValue, TRUE); # Add quotes, and escape " and all string-termination chars
|
||||
break;
|
||||
}
|
||||
case "integer": {
|
||||
|
@ -179,7 +179,7 @@ abstract class Config extends \Flake\Core\Model\NoDb {
|
|||
break;
|
||||
}
|
||||
default: {
|
||||
$sValue = '""';
|
||||
$sValue = "''";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue