From 6fcfcc968f8e14157ac0b8431292ad3508fd5f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org> Date: Wed, 1 Jul 2020 15:24:10 +0200 Subject: [PATCH] :sparkles: feat(errors) Small improvements of hooks error rendering issue #6071 --- include/errors/class_SimplePluginHookError.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/errors/class_SimplePluginHookError.inc b/include/errors/class_SimplePluginHookError.inc index ce119646f..d235cb194 100644 --- a/include/errors/class_SimplePluginHookError.inc +++ b/include/errors/class_SimplePluginHookError.inc @@ -29,7 +29,7 @@ class SimplePluginHookError extends SimplePluginError { $this->hookType = $type; - parent::__construct($origin, htmlescape($output), $code, $previous); + parent::__construct($origin, '<pre><samp>'.htmlescape($output).'</samp></pre>', $code, $previous); } public function toArray (): array @@ -61,11 +61,13 @@ class SimplePluginHookError extends SimplePluginError } else { $html .= htmlescape($label); } + $html .= htmlescape(' > '); } + $html .= htmlescape($this->hookType); - $html .= '<br/><br/>'; + $html .= '<br/><br/>'."\n"; - $html .= htmlescape(sprintf(_('Trigger "%s" returned an error!'), $this->hookType)); + $html .= htmlescape(_('Trigger returned an error!')); $html .= '<br/><br/>'."\n"; $html .= htmlescape(sprintf(_('Exit code: %d'), $this->getCode())).'<br/>'."\n"; -- GitLab