summaryrefslogtreecommitdiffstats
path: root/inc/up_json_encode.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-05-11 19:00:30 +0200
committerSimon Rettberg2016-05-11 19:00:30 +0200
commit1cc1c2ed092c46eb35893c1d85accb24cf43d7f9 (patch)
tree95c1302f4a1ae441e174a1dca64133e2873f8297 /inc/up_json_encode.php
parentAdd PhpStorm prefs (diff)
downloadslx-admin-1cc1c2ed092c46eb35893c1d85accb24cf43d7f9.tar.gz
slx-admin-1cc1c2ed092c46eb35893c1d85accb24cf43d7f9.tar.xz
slx-admin-1cc1c2ed092c46eb35893c1d85accb24cf43d7f9.zip
Still working in modularization cleanup and refinement
Diffstat (limited to 'inc/up_json_encode.php')
-rw-r--r--inc/up_json_encode.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/up_json_encode.php b/inc/up_json_encode.php
index c33cb012..0f5776c2 100644
--- a/inc/up_json_encode.php
+++ b/inc/up_json_encode.php
@@ -164,7 +164,7 @@ function up_json_encode($var, $options = 0, $_indent = "")
} elseif (is_float($var)) {
if (is_nan($var) || is_infinite($var)) {
${'.json_last_error'} = JSON_ERROR_INF_OR_NAN;
- return;
+ return false;
} else {
$json = "$var";
}
@@ -174,7 +174,7 @@ function up_json_encode($var, $options = 0, $_indent = "")
else {
trigger_error("up_json_encode: don't know what a '" . gettype($var) . "' is.", E_USER_WARNING);
${'.json_last_error'} = JSON_ERROR_UNSUPPORTED_TYPE;
- return;
+ return false;
}
#-- done