mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/10824] Use json_sanitzer::decode and improve migrations from pre 3.2
PHPBB3-10824
This commit is contained in:
@@ -1191,6 +1191,7 @@ class acp_styles
|
||||
* Read style composer.json file
|
||||
*
|
||||
* @param string $dir style directory
|
||||
*
|
||||
* @return array Style data
|
||||
* @throws \DomainException in case of error
|
||||
*/
|
||||
@@ -1203,7 +1204,7 @@ class acp_styles
|
||||
}
|
||||
|
||||
$json = file_get_contents($this->styles_path . $dir . '/composer.json');
|
||||
$style_data = \phpbb\json_sanitizer::sanitize(json_decode($json, true));
|
||||
$style_data = \phpbb\json_sanitizer::decode($json);
|
||||
|
||||
if (!is_array($style_data) || !isset($style_data['type']) || $style_data['type'] !== 'phpbb-style')
|
||||
{
|
||||
|
Reference in New Issue
Block a user