From cd55ead3e2810e209b726faca12fa749f6875d0f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 16 Dec 2017 18:33:16 +0100 Subject: Fix A LOT of type problems, logic flaws, uninitialized variables etc. Most of them were found by phpstorm, so I put in some time and went through the list, fixing quite a bunch of them. --- inc/up_json_encode.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'inc/up_json_encode.php') diff --git a/inc/up_json_encode.php b/inc/up_json_encode.php index 0f5776c2..ac47ef51 100644 --- a/inc/up_json_encode.php +++ b/inc/up_json_encode.php @@ -90,7 +90,6 @@ function up_json_encode($var, $options = 0, $_indent = "") #-- prepare JSON string list($_space, $_tab, $_nl) = ($options & JSON_PRETTY_PRINT) ? array(" ", " $_indent", "\n") : array("", "", ""); - $json = "$_indent"; if (($options & JSON_NUMERIC_CHECK) and is_string($var) and is_numeric($var)) { $var = (strpos($var, ".") || strpos($var, "e")) ? floatval($var) : intval($var); @@ -143,7 +142,6 @@ function up_json_encode($var, $options = 0, $_indent = "") "<" => $options & JSON_HEX_TAG ? "\\u003C" : "<", ">" => $options & JSON_HEX_TAG ? "\\u003E" : ">", "'" => $options & JSON_HEX_APOS ? "\\u0027" : "'", - "\"" => "\\u0022", "&" => $options & JSON_HEX_AMP ? "\\u0026" : "&", ); $var = strtr($var, $rewrite); -- cgit v1.2.3-55-g7522