From 2089d25626bb3454d45203b335f528219176edc1 Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Sun, 8 Sep 2024 18:21:22 +0530 Subject: [PATCH] deprecation warning fix strpos(): Passing null to parameter deprecation warning fix strpos(): Passing null to parameter --- src/wp-includes/functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 0619f44f30d4e..d28aa91208f33 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -7307,6 +7307,11 @@ function _device_can_upload() { * @return bool True if the path is a stream URL. */ function wp_is_stream( $path ) { + + if ( empty( $path ) && ! is_string( $path ) ) { + return false; + } + $scheme_separator = strpos( $path, '://' ); if ( false === $scheme_separator ) {