10up/10up-experience

PHP 8.1/8.2 Compat

turtlepod opened this issue · 3 comments

Describe the bug

Activating the plugin in site with PHP 8.2 trigger this deprecated notice:

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /nas/content/live/devcic/wp-includes/functions.php on line 7127


Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /nas/content/live/devcic/wp-includes/functions.php on line 2182

Steps to Reproduce

  1. Install the plugin.
  2. Make sure you use PHP 8.2
  3. Make sure you set WP_DEBUG to true
  4. Activate the plugin.
  5. See the php notice

Screenshots, screen recording, code snippet

image

Environment information

Windows 11 Pro.
Chome (latest)

WordPress information

Host: WP Engine
WP: Version 6.3.2

Code of Conduct

  • I agree to follow this project's Code of Conduct

This occurs on PHP 8.1 as well.

EDIT: Looks like there's a PR open already: #135

Thanks @TylerB24890
Title updated.

This is closed by #135