PHP8.1 deprecation
-
WordPress method
wp_is_stream( $path )inwp-includes/functions.phpcallsstrpos($path, '://' );but your plugin in some conditions callswp_is_stream( $path )with anullvalue, resulting in 2 php warning (php 8.1) when accessing wp-admin (maybe elsewhere too)Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-includes/functions.php on line 7303
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /wp-includes/functions.php on line 2189You can easily fix that by modifying the call to the method
add_submenu_page()in/plugins/testimonial-widgets/testimonials-plugin.class.phpadd_submenu_page(
$v["hide"] ? null : $menu["home_page"],
$v["title"],
$k,
$permission,
$v["url"]
);by
add_submenu_page(
$v["hide"] ? "" : $menu["home_page"],
$v["title"],
$k,
$permission,
$v["url"]
);you’re welcome 🙂
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘PHP8.1 deprecation’ is closed to new replies.