summaryrefslogtreecommitdiffstats
path: root/inc/up_json_encode.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-16 18:33:16 +0100
committerSimon Rettberg2017-12-16 18:33:16 +0100
commitcd55ead3e2810e209b726faca12fa749f6875d0f (patch)
tree94b2f29b023e8a0c5100e1d06c974c3c04f890fd /inc/up_json_encode.php
parentMerge branch 'permission-manager' of openslx.org:openslx-ng/slx-admin into pe... (diff)
downloadslx-admin-cd55ead3e2810e209b726faca12fa749f6875d0f.tar.gz
slx-admin-cd55ead3e2810e209b726faca12fa749f6875d0f.tar.xz
slx-admin-cd55ead3e2810e209b726faca12fa749f6875d0f.zip
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.
Diffstat (limited to 'inc/up_json_encode.php')
-rw-r--r--inc/up_json_encode.php2
1 files changed, 0 insertions, 2 deletions
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);