mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/13860] Fixed array-to-string conversion
PHPBB3-13860
This commit is contained in:
@@ -227,7 +227,13 @@ class parser implements \phpbb\textformatter\parser_interface
|
||||
}
|
||||
}
|
||||
|
||||
return array_unique($errors);
|
||||
// Deduplicate error messages. array_unique() only works on strings so we have to serialize
|
||||
if (!empty($errors))
|
||||
{
|
||||
$errors = array_map('unserialize', array_unique(array_map('serialize', $errors)));
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user