From cc0d4b808ee6a0aac8c153a57b91cab4c942dd27 Mon Sep 17 00:00:00 2001 From: gwoo Date: Thu, 22 Nov 2007 03:59:19 +0000 Subject: [PATCH] updating schema value handling git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6042 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/schema.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/cake/libs/model/schema.php b/cake/libs/model/schema.php index 2e46c3715..1d7b04113 100644 --- a/cake/libs/model/schema.php +++ b/cake/libs/model/schema.php @@ -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}"; } } }