Streams: When checking in `wp_is_stream()` escape the stream wrapper names for PCRE to avoid PHP warnings when invalid stream wrappers are registered.
Props dd32. Merges [42432] to the 4.9 branch. Fixes #43054. Built from https://develop.svn.wordpress.org/branches/4.9@43483 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec980c34e0
commit
227534fae8
|
@ -5227,8 +5227,9 @@ function _device_can_upload() {
|
|||
* @return bool True if the path is a stream URL.
|
||||
*/
|
||||
function wp_is_stream( $path ) {
|
||||
$wrappers = stream_get_wrappers();
|
||||
$wrappers_re = '(' . join('|', $wrappers) . ')';
|
||||
$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 = '4.9.8-alpha-43482';
|
||||
$wp_version = '4.9.8-alpha-43483';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue