aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter/s9e/parser.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/parser.php')
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index b7d0b2b90b..e2653d60f0 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -50,6 +50,7 @@ class parser implements \phpbb\textformatter\parser_interface
$this->dispatcher = $dispatcher;
$this->parser = $parser;
+
$parser = $this;
/**
@@ -195,7 +196,7 @@ class parser implements \phpbb\textformatter\parser_interface
$errors = array();
foreach ($this->parser->getLogger()->get() as $entry)
{
- list($type, $msg, $context) = $entry;
+ list(, $msg, $context) = $entry;
if ($msg === 'Tag limit exceeded')
{
@@ -227,7 +228,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;
}
/**
@@ -364,7 +371,7 @@ class parser implements \phpbb\textformatter\parser_interface
if ($max_height || $max_width)
{
- $imagesize = new \fastImageSize\fastImageSize();
+ $imagesize = new \FastImageSize\FastImageSize();
$size_info = $imagesize->getImageSize($url);
if ($size_info === false)
{