From a9977dc5d17e7f4ce830f4f42a5dd70b021c99a5 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Wed, 25 Jan 2017 19:13:38 +0700 Subject: [PATCH] Fixed Notice error --- src/PHPCensor/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHPCensor/Application.php b/src/PHPCensor/Application.php index c338c227..a469be95 100644 --- a/src/PHPCensor/Application.php +++ b/src/PHPCensor/Application.php @@ -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();