1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

Merge branch '3.2.x' into 3.3.x

This commit is contained in:
Marc Alexander 2020-04-22 22:00:50 +02:00
commit 6b5b413025
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -35,7 +35,7 @@ class parser implements \phpbb\textformatter\parser_interface
/**
* Constructor
*
* @param \phpbb\cache\driver_interface $cache
* @param \phpbb\cache\driver\driver_interface $cache
* @param string $key Cache key
* @param factory $factory
* @param \phpbb\event\dispatcher_interface $dispatcher
@ -197,7 +197,9 @@ class parser implements \phpbb\textformatter\parser_interface
public function get_errors()
{
$errors = array();
foreach ($this->parser->getLogger()->getLogs() as $entry)
$entries = $this->parser->getLogger()->getLogs();
foreach ($entries as $entry)
{
list(, $msg, $context) = $entry;
@ -237,6 +239,25 @@ class parser implements \phpbb\textformatter\parser_interface
$errors = array_map('unserialize', array_unique(array_map('serialize', $errors)));
}
$parser = $this;
/**
* Modify error messages generated by the s9e\TextFormatter's logger
*
* @event core.text_formatter_s9e_get_errors
* @var parser parser This parser service
* @var array entries s9e\TextFormatter's logger entries
* @var array errors Error arrays with language key and optional arguments
* @since 3.2.10-RC1
* @since 3.3.1-RC1
*/
$vars = [
'parser',
'entries',
'errors',
];
extract($this->dispatcher->trigger_event('core.text_formatter_s9e_get_errors', compact($vars)));
return $errors;
}