Changed 'undefined' to 'null'
'undefined' is not a valid JSON attribute value and should been 'null'
This commit is contained in:
parent
d0268c69da
commit
3a1c251065
|
@ -243,7 +243,7 @@ function json_row($key, $val = null) {
|
||||||
echo "{";
|
echo "{";
|
||||||
}
|
}
|
||||||
if ($key != "") {
|
if ($key != "") {
|
||||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'undefined');
|
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
|
||||||
$first = false;
|
$first = false;
|
||||||
} else {
|
} else {
|
||||||
echo "\n}\n";
|
echo "\n}\n";
|
||||||
|
|
Loading…
Reference in a new issue