mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/10824] Make sure to always return array from decode method
PHPBB3-10824
This commit is contained in:
parent
9284500b5e
commit
414327dc70
1 changed files with 2 additions and 1 deletions
|
@ -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) : [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue