@@ -34,7 +34,11 @@ class Twig | |||
public function addBlockVariable($block, $data) | |||
{ | |||
$current = $this->variables[$block]; | |||
$new = array_merge($current, $data); | |||
if ($current) { | |||
$new = array_merge($current, $data); | |||
} else { | |||
$new = $data; | |||
} | |||
$this->variables[$block] = $new; | |||
} | |||