Commit 21dedc21 authored by Marc Egger's avatar Marc Egger
Browse files

Report.php: Twig, convert json object into associative array

parent d5271049
Pipeline #2344 passed with stages
in 2 minutes and 46 seconds
......@@ -715,7 +715,7 @@ class Report {
// Json decode Filter
// E.g.: {% set obj = '["this is one", "this is two"]' | json_decode%}
$filter = new \Twig\TwigFilter('json_decode', function ($string) {
return json_decode($string);
return json_decode($string, true);
}, ['is_safe' => ['html']]);
$twig->addFilter($filter);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment