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
deprecation warning fix strpos(): Passing null to parameter
deprecation warning fix strpos(): Passing null to parameter
  • Loading branch information
deepakrohillas authored Sep 8, 2024
commit 2089d25626bb3454d45203b335f528219176edc1
5 changes: 5 additions & 0 deletions src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down