Browse Source

Fixed default dump argument.

merge-requests/4/head
Chi 7 years ago
parent
commit
b8e8e0a374
  1. 2
      src/TwigExtension.php

2
src/TwigExtension.php

@ -433,7 +433,7 @@ class TwigExtension extends \Twig_Extension {
public function drupalDump(array $context, $variable = NULL) {
$var_dumper = '\Symfony\Component\VarDumper\VarDumper';
if (class_exists($var_dumper)) {
call_user_func($var_dumper . '::dump', isset($variable) ? $variable : $context);
call_user_func($var_dumper . '::dump', func_num_args() == 1 ? $context : $variable);
}
else {
trigger_error('Could not dump the variable because symfony/var-dumper component is not installed.', E_USER_WARNING);

Loading…
Cancel
Save