Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #59940


Ignore:
Timestamp:
11/21/2023 05:37:14 PM (18 months ago)
Author:
sabernhardt
Comment:

Hi and welcome to WordPress Core Trac!

#57580, #57581 and #59757 have similar reports about the wp_normalize_path() function (line 2187), which also involves wp_is_stream() (line 7241). The $path parameter has needed to be a string since the function was introduced.

Can you determine what code is incorrectly trying to use null with wp_normalize_path()? If that is in a plugin, the error will need to be reported to its author(s).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59940

    • Property Keywords reporter-feedback added
  • Ticket #59940 – Description

    initial v1  
    11Hi, I updated my server to PHP 8 and started getting errors in the debug log that you might want to look into. WordPress is updated so I'm afraid these bugs were missed. You can't pass NULL to these two functions anymore. Thanks.
    22
    3 PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-includes/functions.php on line 7241
    4 PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /wp-includes/functions.php on line 2187
     3`PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-includes/functions.php on line 7241`
     4`PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /wp-includes/functions.php on line 2187`