Unverified Commit 07d5e997 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(errors) Fix a PHP error and hook error content

<p> cannot contain <pre> so we cannot use <pre> in hook error content.

issue #6071
Showing with 2 additions and 2 deletions
+2 -2
......@@ -48,7 +48,7 @@ class SimplePluginError extends FusionDirectoryError
} elseif ($origin instanceof simpleTabs) {
$this->tab = NULL;
$this->object = $origin;
} else {
} elseif ($origin !== NULL) {
trigger_error('Invalid origin of class '.get_class($origin));
}
}
......
......@@ -29,7 +29,7 @@ class SimplePluginHookError extends SimplePluginError
{
$this->hookType = $type;
parent::__construct($origin, '<pre><samp>'.htmlescape($output).'</samp></pre>', $code, $previous);
parent::__construct($origin, nl2br('<samp>'.htmlescape($output).'</samp>'), $code, $previous);
}
public function toArray (): array
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment