Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
oldrup opened this issue Sep 24, 2023 · 2 comments
Assignees
Milestone

Comments

@oldrup
Copy link

oldrup commented Sep 24, 2023

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
Copy link
Author

oldrup commented Sep 24, 2023

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

sc0ttkclark added a commit that referenced this issue Sep 28, 2023
@sc0ttkclark
Copy link
Member

Fixed via 679a2dd

@sc0ttkclark sc0ttkclark added this to the Pods 3.0.5 milestone Sep 28, 2023
@sc0ttkclark sc0ttkclark self-assigned this Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants