From c5c674842d348bf7a22757d042a9ce542b5c7644 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 19 Jul 2014 23:56:45 +0200 Subject: [PATCH] json_decode() will raise a warning on invalid input (PHP 5.6) --- wcfsetup/install/files/lib/util/JSON.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/JSON.class.php b/wcfsetup/install/files/lib/util/JSON.class.php index 444d8ca0e8..c651b4d051 100644 --- a/wcfsetup/install/files/lib/util/JSON.class.php +++ b/wcfsetup/install/files/lib/util/JSON.class.php @@ -32,7 +32,7 @@ final class JSON { */ public static function decode($json, $asArray = true) { // decodes JSON - $data = json_decode($json, $asArray); + $data = @json_decode($json, $asArray); if ($data === null && self::getLastError() !== JSON_ERROR_NONE) { throw new SystemException('Could not decode JSON (error '.self::getLastError().'): '.$json); -- 2.20.1