]> git.joonet.de Git - adminer.git/commitdiff
Changed 'undefined' to 'null'
authorshaununderwood <shaununderwood@users.noreply.github.com>
Sun, 23 Oct 2016 19:23:38 +0000 (20:23 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 18 Feb 2017 16:32:40 +0000 (17:32 +0100)
'undefined' is not a valid JSON attribute value and should been 'null'

adminer/include/functions.inc.php

index e7bdb16247f784d72a4ae622f7fbac3c7a75acc6..8b97138d15aff35bf8c61ddc086b8a541eac2baa 100644 (file)
@@ -243,7 +243,7 @@ function json_row($key, $val = null) {
                echo "{";
        }
        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;
        } else {
                echo "\n}\n";