Please let's have null-safe version of Twig extension
Closed this issue · 1 comments
ostrolucky commented
Since 3.0, parameter was typehinted to string
, which breaks stuff for everybody passing null there. Nullable getters are very widespread, please don't make us do
{{ activity.getNote ? activity.getNote|purify }}
on each instance. It's fine this typehint is present in HTMLPurifierRuntime, but twig filter should be a closure typehinted to ?string
that shouldn't pass null along to HTMLPurifierRuntime
HeahDude commented
3.0.1 is now released, closing here, thanks!