@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | private static function renderCliException($message, $file, $line, $trace, $lines) |
| 76 | 76 | { |
| 77 | 77 | if (ob_get_contents()) ob_end_clean(); |
| 78 | - include(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewcli.php'); |
|
| 78 | + include(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewcli.php'); |
|
| 79 | 79 | exit; |
| 80 | 80 | } |
| 81 | 81 | |
@@ -87,12 +87,12 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | private static function dontShowError($message, $file, $line, $httpHeader) |
| 89 | 89 | { |
| 90 | - header($_SERVER['SERVER_PROTOCOL'] . $httpHeader, true); |
|
| 91 | - header('X-Error-Message: ' . $message); |
|
| 92 | - header('X-Error-File: ' . $file); |
|
| 93 | - header('X-Error-Line: ' . $line); |
|
| 94 | - if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewcompact.php')) { |
|
| 95 | - include(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewcompact.php'); |
|
| 90 | + header($_SERVER['SERVER_PROTOCOL'].$httpHeader, true); |
|
| 91 | + header('X-Error-Message: '.$message); |
|
| 92 | + header('X-Error-File: '.$file); |
|
| 93 | + header('X-Error-Line: '.$line); |
|
| 94 | + if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewcompact.php')) { |
|
| 95 | + include(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewcompact.php'); |
|
| 96 | 96 | } else { |
| 97 | 97 | header('Content-type: application/json'); |
| 98 | 98 | die(json_encode('An error occured.')); |
@@ -160,11 +160,11 @@ discard block |
||
| 160 | 160 | 'httpHeader' => $httpHeader, |
| 161 | 161 | ); |
| 162 | 162 | |
| 163 | - if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewdetailed.php')) { |
|
| 164 | - header($_SERVER['SERVER_PROTOCOL'] . $httpHeader, true); |
|
| 165 | - include(__DIR__ . DIRECTORY_SEPARATOR . 'errortemplates/errorviewdetailed.php'); |
|
| 163 | + if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewdetailed.php')) { |
|
| 164 | + header($_SERVER['SERVER_PROTOCOL'].$httpHeader, true); |
|
| 165 | + include(__DIR__.DIRECTORY_SEPARATOR.'errortemplates/errorviewdetailed.php'); |
|
| 166 | 166 | } else { |
| 167 | - header($_SERVER['SERVER_PROTOCOL'] . $httpHeader, true); |
|
| 167 | + header($_SERVER['SERVER_PROTOCOL'].$httpHeader, true); |
|
| 168 | 168 | header('Content-type: application/json'); |
| 169 | 169 | die(json_encode($error)); |
| 170 | 170 | } |