forked from La_Bureautique/zeg1jeux
push
This commit is contained in:
parent
af4777df69
commit
a713afd017
|
@ -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 '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>'. _('Erreur critique') . '</title>
|
||||
echo '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>'. ('Erreur critique') . '</title>
|
||||
|
||||
<style>
|
||||
<style>
|
||||
|
||||
div {
|
||||
div {
|
||||
|
||||
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);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
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);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>';
|
||||
<body>
|
||||
<div>';
|
||||
|
||||
|
||||
foreach ($errorMsgs as $msg) {
|
||||
foreach ($errorMsgs as $msg) {
|
||||
|
||||
echo '<pre>' . print_r($msg, true) . '</pre>';
|
||||
}
|
||||
echo '<pre>' . print_r($msg, true) . '</pre>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
echo '
|
||||
</div>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
die;
|
||||
}
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue