FIX - warning при рендере без параметров
This commit is contained in:
parent
f175de000c
commit
9ab2eff6e7
|
|
@ -42,7 +42,10 @@ abstract class Controller
|
||||||
ob_start();
|
ob_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
extract($data);
|
if ( $data && is_array($data) )
|
||||||
|
{
|
||||||
|
extract($data);
|
||||||
|
}
|
||||||
|
|
||||||
include App::getBasedir() . 'views/' . $template;
|
include App::getBasedir() . 'views/' . $template;
|
||||||
|
|
||||||
|
|
@ -67,7 +70,7 @@ abstract class Controller
|
||||||
static function render($template, $data, $return = false)
|
static function render($template, $data, $return = false)
|
||||||
{
|
{
|
||||||
$content = self::renderPartial($template, $data, true);
|
$content = self::renderPartial($template, $data, true);
|
||||||
|
|
||||||
$result = self::renderPartial(self::$layout, array(
|
$result = self::renderPartial(self::$layout, array(
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
'styles' => self::$styles,
|
'styles' => self::$styles,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue