getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
https://getgrav.org
MIT License
14.59k stars 1.41k forks source link

[bug] Null still wrapped into array in Clockwork #3610

Open Sogl opened 2 years ago

Sogl commented 2 years ago

For example dump any var that doesn't exist on page:


{{ dump(something) }}

Log output: image

Related issue: https://github.com/getgrav/grav/issues/3393

Also I can't use clock output func in twig (described here):


{{ clock(something) }}

Returns nothing.

Karmalakas commented 2 years ago

Also I can't use clock output func in twig (described here):

clock() is a Clockworks JS function. You can't use it in Twig just like that


BTW, I might add to the same issue, that empty arrays are not printed correctly. Currently debug prints out just a string array, when it should be a proper > Array(0) {} (check last image on this comment and note the italics)