Closed bertoost closed 6 years ago
Hey Bert! Thanks for the PR!
When I try {{ dump(variable) }}
in twig (in a plugin template), it prints the raw HTML but not the "parsed" dump. Am I missing any parameters?
What exactly do you dump? Some variables, like Redactor content, are actually objects which will be parsed when calling it directly as “entry.body”. Only then it will be parsed and shown well.
I was dumping an array with 1 object in it (a model with some string values). Weird, cause both d()
and dd()
can parse it without issue. Will look into it.
Thats weird indeed. I tried dump()
myself and works fine my side... Maybe something along your installation or usage. Like to know.
Had to echo the results instead of just returning them, that fixed it. Merged & released an update with this update!
Ah okay! I remember how that comes... I have used \Twig_SimpleFunction()
and on the very last moment I changed it to \Twig_Function()
to be compatible with yours. Assumed they worked the same I guess :-)
Thanks anyway!
With the same 'is safe' check
And not breaking current dump methods d() and dd().