Deprecated warnings for core WP with PHP 8.1

[ad_1]

I’m reading here that PHP 8.x is still in beta support for WP 6.0 but security updates for PHP 7.4 are ending 28 Nov 2022. So I decided tot test with WP 6.02 and PHP 8.1 on our staging site.

Unfortunately we get many Depricated lines. Some on the front end, and the dashboard gets flooded with these lines. I think /wp-includes/functions.php and /wp-includes/formatting.php are WP core, not some outdated plugin or theme.

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/ams01-dbjv/sites/lvbhbnldev/public/wp-includes/functions.php on line 7035

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/ams01-dbjv/sites/lvbhbnldev/public/wp-includes/functions.php on line 2164

(repeated many times)

Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/ams01-dbjv/sites/lvbhbnldev/public/wp-includes/formatting.php on line 2772

(repeated 2 times)

Theme is Avada 7.8.2, but I don’t think the above is related to the theme.

  • This topic was modified 1 hour, 55 minutes ago by willemb2.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer