From 9ab2eff6e71b954b9837644ac5522981d22c25ae Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sun, 1 Jun 2014 20:43:59 +0400 Subject: [PATCH] =?UTF-8?q?FIX=20-=20warning=20=D0=BF=D1=80=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B5=D0=BD=D0=B4=D0=B5=D1=80=D0=B5=20=D0=B1=D0=B5=D0=B7=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/classes/Controller.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ground/classes/Controller.php b/ground/classes/Controller.php index 2aa59e6..c4d6cd7 100644 --- a/ground/classes/Controller.php +++ b/ground/classes/Controller.php @@ -42,7 +42,10 @@ abstract class Controller ob_start(); } - extract($data); + if ( $data && is_array($data) ) + { + extract($data); + } include App::getBasedir() . 'views/' . $template; @@ -67,7 +70,7 @@ abstract class Controller static function render($template, $data, $return = false) { $content = self::renderPartial($template, $data, true); - + $result = self::renderPartial(self::$layout, array( 'content' => $content, 'styles' => self::$styles,