From a0c5b898e1e262f230de84ad251a6523661baf09 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 9 Sep 2016 12:58:50 +0200 Subject: [PATCH] Added ability to pass options to JSON encoding (#2106) * Added ability to pass options to json encoding * Don't duplicate the JSON options constants --- wcfsetup/install/files/lib/util/JSON.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/util/JSON.class.php b/wcfsetup/install/files/lib/util/JSON.class.php index c9512ce916..167ea5420b 100644 --- a/wcfsetup/install/files/lib/util/JSON.class.php +++ b/wcfsetup/install/files/lib/util/JSON.class.php @@ -15,10 +15,11 @@ final class JSON { * Returns the JSON representation of a value. * * @param mixed $data + * @param integer $options * @return string */ - public static function encode($data) { - return json_encode($data); + public static function encode($data, $options = 0) { + return json_encode($data, $options); } /** -- 2.20.1