PHP 8.1 - Deprecation on form submit

Hello,

do you have any update for this issue? Any ETA?

production.ERROR: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated {"exception":"[object] (ErrorException(code: 0 ): str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated at /home/XXX/releases/64/web/app/plugins/gravityforms/common.php:2223

Thank you.

Hello. I don’t have a release date (it’s not been fixed yet), but it is in progress.

This is also present on gravityforms/includes/addon/class-gf-auto-upgrade.php line 144, the easiest fix is just to do a null coalescing operator

Change

$cc    = str_replace( ' ', '', $cc);

to

$cc    = str_replace( ' ', '', $cc ?? '' );

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.