From a713afd0172ccf5c8469394b4611d52124b17620 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 16 Mar 2023 04:12:48 +0100 Subject: [PATCH] push --- lib/ErrorsHandler.class.php | 82 ++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/lib/ErrorsHandler.class.php b/lib/ErrorsHandler.class.php index 1f99520..9fe061f 100644 --- a/lib/ErrorsHandler.class.php +++ b/lib/ErrorsHandler.class.php @@ -2,63 +2,63 @@ class ErrorsHandler { - public function __construct () { + public function __construct () { - } + } - static public function kaput ($errorMsgs) { + static public function kaput ($errorMsgs) { - ob_get_clean(); // to prevent error message to display inside an HTML container (case of error generated by get method calls) + ob_get_clean(); // to prevent error message to display inside an HTML container (case of error generated by get method calls) - if (!is_array($errorMsgs)) { + if (!is_array($errorMsgs)) { - $errorMsgs = explode("\n", $errorMsgs); - } + $errorMsgs = explode("\n", $errorMsgs); + } - echo ' - - - - '. _('Erreur critique') . ' + echo ' + + + + '. ('Erreur critique') . ' - - + overflow: auto; + word-wrap: break-word; + background-color: hsl(0, 100%, 69%); + color: hsl(0, 100%, 19%); + margin: 1em; + padding: 1em; + border-radius: 1em; + position: fixed; + top: 0; + left: 0; + width: calc(100% - 4em); + max-height: calc(100vh - 4em); + } + + - -
'; + +
'; - foreach ($errorMsgs as $msg) { + foreach ($errorMsgs as $msg) { - echo '
' . print_r($msg, true) . '
'; - } + echo '
' . print_r($msg, true) . '
'; + } - echo ' -
- - '; + echo ' +
+ + '; - die; - } + die; + } -} \ No newline at end of file +}