PHP 8.1 - Smarty 4.1 Deprecated preg_replace(): Passing null to parameter #3 ($subject) #738
cristianocaruso
started this conversation in
Show and tell
Replies: 1 comment
-
Ported in into #803 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
my script gets me this error with preg_replace
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Smarty4\sysplugins\smarty_resource_recompiled.php(56) : eval()'d code on line 20
Searching in source I've found an issue with PHP 8.1 when parameter {$params[0]} is null so I used Elvis operator ( ?: ) to bypass null value
smartylibs/plugins/modifiercompiler.strip_tags.php
Maybe this helps someone, can you add to source?
Beta Was this translation helpful? Give feedback.
All reactions