mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
updating schema value handling
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6042 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c4c6ad1a86
commit
cc0d4b808e
1 changed files with 2 additions and 11 deletions
|
@ -404,17 +404,8 @@ class CakeSchema extends Object {
|
|||
if (is_array($val)) {
|
||||
$vals[] = "'{$key}' => array('".join("', '", $val)."')";
|
||||
} else if (!is_numeric($key)) {
|
||||
$prop = "'{$key}' => ";
|
||||
if (is_bool($val)) {
|
||||
$prop .= $val ? 'true' : 'false';
|
||||
} elseif (is_numeric($val)) {
|
||||
$prop .= $val;
|
||||
} elseif ($val === null) {
|
||||
$prop .= 'null';
|
||||
} else {
|
||||
$prop .= "'{$val}'";
|
||||
}
|
||||
$vals[] = $prop;
|
||||
$val = var_export($val, true);
|
||||
$vals[] = "'{$key}' => {$val}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue