Fixed Notice error

This commit is contained in:
Dmitry Khomutov 2017-01-25 19:13:38 +07:00
commit a9977dc5d1
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -104,7 +104,7 @@ class Application extends b8\Application
$this->response->setContent($view->render());
}
if ($this->response->hasLayout() && $this->controller->layout) {
if ($this->response->hasLayout() && $this->controller && $this->controller->layout) {
$this->setLayoutVariables($this->controller->layout);
$this->controller->layout->content = $this->response->getContent();