You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError
craft\web\twig\Extension::purifyFilter(): Argument #1 ($html) must be of type string, null given, called in /var/www/site/production/shared/storage/runtime/compiled_templates/40/****.php on line 73
Steps to reproduce
Run any null variable through the | purify filter
Expected behavior
I would expect a little more forgiveness from the | purify filter to return null if it receives null rather than TypeError what amounts to an empty $html parameter.
Actual behavior
TypeError above or 500 Error
Craft CMS version
4.4.16.1
PHP version
8.2.6
Operating system and version
Linux 5.15.0-1036-aws
Database type and version
MySQL 8.0.28
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.10-23)
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered:
Hi, thanks for reporting! We’ve made the purify filter more forgiving. If a null value is provided to the $html parameter, it will return it immediately instead of throwing an error.
Hi, thanks for reporting! We’ve made the purify filter more forgiving. If a null value is provided to the $html parameter, it will return it immediately instead of throwing an error.
Thank you so much!
I've recently made the switch from Redactor to CKeditor and (as part of that change) just started creating HTML Purifier configurations that match each CKeditor configuration.
What happened?
Description
Most of the time, I'm careful enough to check content before piping it to
| purify
like... but the following will cause a
500 Error
on a site wheredevMode
is falseand throw this error if
devMode
is true:Steps to reproduce
| purify
filterExpected behavior
I would expect a little more forgiveness from the
| purify
filter to returnnull
if it receivesnull
rather than TypeError what amounts to an empty$html
parameter.Actual behavior
TypeError above or 500 Error
Craft CMS version
4.4.16.1
PHP version
8.2.6
Operating system and version
Linux 5.15.0-1036-aws
Database type and version
MySQL 8.0.28
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.10-23)
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: