1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Merge pull request #3622 from s9e/ticket/13860

[ticket/13860] Fixed array-to-string conversion
This commit is contained in:
Tristan Darricau
2015-05-29 13:15:33 +02:00
2 changed files with 37 additions and 24 deletions

View File

@@ -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;
}
/**