str_replace(): Passing null to parameter #3 Deprecated

[ad_1]

Hello,

When updating php to 8.1 we can see a lot of Warnings in debug:

str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

This is what we can also get in New Relic:


in str_replace called at /home/chilevapo.cl/public_html/wp-includes/formatting.php (3993)
in wp_trim_excerpt called at /home/chilevapo.cl/public_html/wp-includes/class-wp-hook.php (324)
in WP_Hook::apply_filters called at /home/chilevapo.cl/public_html/wp-includes/plugin.php (205)
in apply_filters called at /home/chilevapo.cl/public_html/wp-includes/post-template.php (434)
in get_the_excerpt called at /home/chilevapo.cl/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php (148)
in RankMath\OpenGraph\OpenGraph::fallback_description called at /home/chilevapo.cl/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php (125)
in RankMath\OpenGraph\OpenGraph::get_description called at /home/chilevapo.cl/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-twitter.php (174)
in RankMath\OpenGraph\Twitter::description called at /home/chilevapo.cl/public_html/wp-includes/class-wp-hook.php (324)
in WP_Hook::apply_filters called at /home/chilevapo.cl/public_html/wp-includes/class-wp-hook.php (348)
in WP_Hook::do_action called at /home/chilevapo.cl/public_html/wp-includes/plugin.php (565)
in do_action_ref_array called at /home/chilevapo.cl/public_html/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php (90)
in RankMath\OpenGraph\OpenGraph::do_action called at /home/chilevapo.cl/public_html/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php (74)
in RankMath\OpenGraph\OpenGraph::output_tags called at /home/chilevapo.cl/public_html/wp-includes/class-wp-hook.php (324)
in WP_Hook::apply_filters called at /home/chilevapo.cl/public_html/wp-includes/class-wp-hook.php (348)
in WP_Hook::do_action called at /home/chilevapo.cl/public_html/wp-includes/plugin.php (565)
in do_action_ref_array called at /home/chilevapo.cl/public_html/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php (90)
in RankMath\Frontend\Head::do_action called at /home/chilevapo.cl/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php (172)
in RankMath\Frontend\Head::head called at /home/chilevapo.cl/public_html/wp-includes/class-wp-hook.php (324)
in WP_Hook::apply_filters called at /home/chilevapo.cl/public_html/wp-includes/class-wp-hook.php (348)
in WP_Hook::do_action called at /home/chilevapo.cl/public_html/wp-includes/plugin.php (517)

The message goes away when disabling Rank Math Plugin.

The page I need help with: [log in to see the link]

 

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