FIX - warning при рендере без параметров
This commit is contained in:
parent
f175de000c
commit
9ab2eff6e7
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue