[wp-trac] [WordPress Trac] #60223: Depricated in PHP 8.1.26
WordPress Trac
noreply at wordpress.org
Thu Jan 11 21:53:40 UTC 2024
#60223: Depricated in PHP 8.1.26
--------------------------+------------------------
Reporter: opajaap | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
--------------------------+------------------------
Old description:
> 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
New description:
`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
--
Comment (by sabernhardt):
#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
[https://wpdirectory.net/search/01HHD6Z8T4Y1ACTKK68HJ5CNJJ 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60223#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list