[ticket/10824] Make sure to always return array from decode method

PHPBB3-10824
This commit is contained in:
Marc Alexander 2019-01-01 16:50:38 +01:00
parent 9284500b5e
commit 414327dc70
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -50,6 +50,7 @@ class json_sanitizer
*/
static public function decode($json)
{
return self::sanitize(json_decode($json, true));
$data = json_decode($json, true);
return !empty($data) ? self::sanitize($data) : [];
}
}