Ver código fonte

fix bug when no block existis

master
Ruben De Baets 2 anos atrás
pai
commit
f258ad9a41
1 arquivos alterados com 5 adições e 1 exclusões
  1. 5
    1
      src/View/Twig.php

+ 5
- 1
src/View/Twig.php Ver arquivo

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


Carregando…
Cancelar
Salvar