#60223 closed defect (bug) (duplicate)
Depricated in PHP 8.1.26
Reported by: | opajaap | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in .../wp-includes/functions.php on line 7241
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in .../wp-includes/functions.php on line 2187
Happens on all dashboard pages
Change History (7)
#2
@
11 months ago
I know it is not harmfull, but i am a developer myself (hence WP_DEBUG) and it is nice when i should know that any error/warning is originated in one of my own plugins, makes debugging easier. Besides, if no-one reports it, it might be overlooked.
#3
@
11 months ago
- Resolution changed from invalid to duplicate
I don't think this is invalid, It has been reported previously though, so I'm going to change this to be a duplicate of #59940 where there has been a request for more information on what is incorrectly trying to use null with wp_normalize_path(), which would be great to add to that ticket.
#5
@
11 months ago
- Description modified (diff)
#57580 was an earlier ticket with reports about the deprecated warnings for wp_normalize_path()
and wp_is_stream()
.
The four causes identified there were all plugins that had added null
in the add_submenu_page()
function. Those four plugins have been updated for newer PHP, but a directory search still finds many plugins doing it wrong. Because your deprecation notices occur on all dashboard pages, add_submenu_page()
is quite likely where the problem starts in your case too.
If you identify the issue in a plugin, please report it to the plugin's author. If you also would like to share details about the source of the problem, you could comment on #57580.
Hey there!
No worries, those deprecated warnings are pretty common and not an issue. They're just notifications that certain parts of the code are a bit outdated (they will be solved before they even can cause any problems).
To get rid of them, you can do this:
Remember, these warnings are more like gentle reminders and do not cause troubles.