Fixing key quoting in JavascriptHelper::object() (Ticket #1986)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4362 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-31 21:17:07 +00:00
parent caeed6bf4c
commit b721b963d3

View file

@ -355,7 +355,7 @@ class JavascriptHelper extends AppHelper {
if (is_array($val) || is_object($val)) {
$val = $this->object($val, false, '', '', $stringKeys, $quoteKeys, $q);
} else {
if ((!count($stringKeys) && !is_numeric($val) && !is_bool($val)) || ($quoteKeys && in_array($key, $stringKeys)) || (!$quoteKeys && !in_array($key, $stringKeys)) && $val !== null) {
if ((!count($stringKeys) && !is_numeric($val) && !is_bool($val)) || ($quoteKeys && in_array($key, $stringKeys, true)) || (!$quoteKeys && !in_array($key, $stringKeys, true))) {
$val = $q . $this->escapeString($val) . $q;
}
if ($val == null) {