mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 22:40:39 +02:00
[ticket/10824] Make sure to always return array from decode method
PHPBB3-10824
This commit is contained in:
@@ -50,6 +50,7 @@ class json_sanitizer
|
|||||||
*/
|
*/
|
||||||
static public function decode($json)
|
static public function decode($json)
|
||||||
{
|
{
|
||||||
return self::sanitize(json_decode($json, true));
|
$data = json_decode($json, true);
|
||||||
|
return !empty($data) ? self::sanitize($data) : [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user