From b5136b444cb7771a48089cd8c3fab255b86da400 Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Sat, 25 Oct 2014 09:16:07 +1000 Subject: [PATCH] Remove unused function; make it clearer that _json_format is not used in PHP 5.4 & later --- includes/functions.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 11940e129..67ac62dde 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -967,17 +967,12 @@ if (!defined('JSON_UNESCAPED_UNICODE')) function _json_encode($data, $options = 448) { - if (version_compare(PHP_VERSION, '5.4', '>=')) - { + if (version_compare(PHP_VERSION, '5.4', '>=')) { return json_encode($data, $options); } - - return _json_format(json_encode($data), $options); -} - -function _pretty_print_json($json) -{ - return _json_format($json, JSON_PRETTY_PRINT); + else { + return _json_format(json_encode($data), $options); + } } function _json_format($json, $options = 448)