mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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:
parent
caeed6bf4c
commit
b721b963d3
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue