pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 264 forks source link

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in wysiwyg.php on line 241 #7182

Closed oldrup closed 9 months ago

oldrup commented 9 months ago

Description

Testing Pods 3.0.3 with PHP 8.1 and WP 6.3; adding a post with a custom wysiwyg field, I get this deprecation warning.

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/removed/wp-content/plugins/pods/classes/fields/wysiwyg.php on line 241

The WYSIWYG field is using the TinyMCE editor and Trim extra whitespace before/after contents option; that might be relevant for the warning (screenshot below)

Version

3.0.3

Testing Instructions

No response

Screenshots / Screencast

Screenshot of deprecation warning:

image

Screenshot of field settings: image

image

Possible Workaround

It's a deprecation warning, so turning WP_DEBUG off turns off the warning.

Site Health Information

Please reach out to me if that applies.

Pods Package

Please notify me if that applies.
oldrup commented 9 months ago

Additional info; warning only appears when adding a new post, not when editing an existing one.

sc0ttkclark commented 9 months ago

Fixed via https://github.com/pods-framework/pods/commit/679a2ddbe7aa7572c0374123439e1753972971f6