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:
gwoo 2007-11-22 03:59:19 +00:00
parent c4c6ad1a86
commit cc0d4b808e

View file

@ -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}";
}
}
}