[wp-trac] [WordPress Trac] #57581: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in functions.php
WordPress Trac
noreply at wordpress.org
Sun Jan 29 19:17:29 UTC 2023
#57581: str_replace(): Passing null to parameter #3 ($subject) of type array|string
is deprecated in functions.php
--------------------------+-----------------------------
Reporter: ipajen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords: PHP81
Focuses: |
--------------------------+-----------------------------
6.2-alpha-55159, PHP 8.1
When using two different plugins (WP Review Slider Pro (Premium) or Ninja
Forms following are thrown as PHP warning (If any of them are enabled same
warnings are shown, if disabling both plugins no warning exist).
str_replace(): Passing null to parameter #3 ($subject) of type
array|string is deprecated
{{{
wp-includes/functions.php:2160
str_replace()
wp-includes/functions.php:2160
wp_normalize_path()
wp-includes/plugin.php:768
plugin_basename()
wp-admin/includes/plugin.php:1405
add_submenu_page()
wp-content/plugins/wp-review-slider-pro/admin/class-wp-review-slider-pro-
admin.php:990
WP_Review_Pro_Admin->add_menu_pages()
wp-includes/class-wp-hook.php:308
do_action('admin_menu')
wp-admin/includes/menu.php:155
}}}
Is there something Core can do to improve the experience here? Or both
plugin authors need to change?
{{{
functions.php:2160
// Standardize all paths to use '/'.
$path = str_replace( '\\', '/', $path );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57581>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list