Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ function wp_normalize_path( $path ) {
}

// Standardize all paths to use '/'.
$path = str_replace( '\\', '/', $path );
$path = str_replace('\\', '/', $path ?? '');

// Replace multiple slashes down to a singular, allowing for network shares having two slashes.
$path = preg_replace( '|(?<=.)/+|', '/', $path );
Expand Down Expand Up @@ -7357,7 +7357,7 @@ function _device_can_upload() {
* @return bool True if the path is a stream URL.
*/
function wp_is_stream( $path ) {
$scheme_separator = strpos( $path, '://' );
$scheme_separator = strpos($path ?? '', '://');

if ( false === $scheme_separator ) {
// $path isn't a stream.
Expand Down