mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Streams: When checking in wp_is_stream()
escape the stream wrapper names for PCRE to avoid PHP warnings when invalid stream wrappers are registered.
Fixes #43054. Built from https://develop.svn.wordpress.org/trunk@42432 git-svn-id: http://core.svn.wordpress.org/trunk@42262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7bfc60864f
commit
cdfa5adc43
@ -5459,6 +5459,7 @@ function _device_can_upload() {
|
||||
*/
|
||||
function wp_is_stream( $path ) {
|
||||
$wrappers = stream_get_wrappers();
|
||||
$wrappers = array_map( 'preg_quote', $wrappers );
|
||||
$wrappers_re = '(' . join( '|', $wrappers ) . ')';
|
||||
|
||||
return preg_match( "!^$wrappers_re://!", $path ) === 1;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42431';
|
||||
$wp_version = '5.0-alpha-42432';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user