From e0f7c225bc8f6cf8e62dcfc146bdd630e15b6e22 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Thu, 28 May 2015 12:23:45 +0200 Subject: [ticket/13860] Fixed array-to-string conversion PHPBB3-13860 --- phpBB/phpbb/textformatter/s9e/parser.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/textformatter') diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php index b7d0b2b90b..838c211e56 100644 --- a/phpBB/phpbb/textformatter/s9e/parser.php +++ b/phpBB/phpbb/textformatter/s9e/parser.php @@ -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; } /** -- cgit v1.2.1