| Conditions | 5 |
| Paths | 8 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function display() |
||
| 17 | { |
||
| 18 | $this->text = App::$Translate->get('Default', $this->text, ['e' => $this->getMessage()]); |
||
| 19 | |||
| 20 | if (App::$Debug !== null) { |
||
| 21 | App::$Debug->addException($this); |
||
| 22 | } |
||
| 23 | |||
| 24 | $fakeController = new Controller(); |
||
| 25 | if (defined('env_no_layout') && env_no_layout === true) { |
||
| 26 | $fakeController->layout = null; |
||
| 27 | } |
||
| 28 | |||
| 29 | $fakeController->setGlobalVar('title', App::$Translate->get('Default', $this->title)); |
||
| 30 | try { |
||
| 31 | $fakeController->response = App::$View->render('errors/' . $this->tpl, ['msg' => $this->text]); |
||
| 32 | } catch (SyntaxException $e) { |
||
| 33 | $fakeController->response = $this->text; |
||
| 34 | } |
||
| 35 | |||
| 36 | App::$Response->setStatusCode((int)$this->status); |
||
| 37 | } |
||
| 38 | |||
| 39 | } |