[wp-trac] [WordPress Trac] #58104: Deprecated function in PHP 8.1 with WordPress 6.2

WordPress Trac noreply at wordpress.org
Mon Dec 11 23:15:45 UTC 2023


#58104: Deprecated function in PHP 8.1 with WordPress 6.2
----------------------------+------------------------
 Reporter:  salvoaranzulla  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Administration  |     Version:  6.2
 Severity:  normal          |  Resolution:  duplicate
 Keywords:                  |     Focuses:
----------------------------+------------------------
Changes (by sabernhardt):

 * resolution:  invalid => duplicate


Old description:

> On WordPress administration with WordPress 6.2, I see 2 deprecated
> functions:
>
> [07-Apr-2023 12:26:46 UTC] PHP Deprecated:  strpos(): Passing null to
> parameter #1 ($haystack) of type string is deprecated in /.../wp-
> includes/functions.php on line 7053
>

> [07-Apr-2023 12:26:46 UTC] PHP Deprecated:  str_replace(): Passing null
> to parameter #3 ($subject) of type array|string is deprecated in /.../wp-
> includes/functions.php on line 2165

New description:

 On WordPress administration with WordPress 6.2, I see 2 deprecated
 functions:

 `[07-Apr-2023 12:26:46 UTC] PHP Deprecated:  strpos(): Passing null to
 parameter #1 ($haystack) of type string is deprecated in /.../wp-
 includes/functions.php on line 7053`


 `[07-Apr-2023 12:26:46 UTC] PHP Deprecated:  str_replace(): Passing null
 to parameter #3 ($subject) of type array|string is deprecated in /.../wp-
 includes/functions.php on line 2165`

--

Comment:

 I would like to know //which// function the plugin used incorrectly,
 especially if it included a wrong type in the `add_submenu_page()`
 function.

 If you could determine which function or which plugin causes the error,
 please share the information on #57580. (I am not yet sure about reopening
 that ticket, but you can comment while it is still closed.)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58104#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list