Browse Source

fix bug when no block existis

master
Ruben De Baets 2 years ago
parent
commit
f258ad9a41
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/View/Twig.php

+ 5
- 1
src/View/Twig.php View File

@@ -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;
}


Loading…
Cancel
Save