mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 15:31:42 +01:00
Bootstrap/Load: In wp_get_server_protocol()
, check if $_SERVER['SERVER_PROTOCOL']
is defined, to avoid a notice in CLI context.
Props thakkarhardik, malthert. Fixes #47005. Built from https://develop.svn.wordpress.org/trunk@45400 git-svn-id: http://core.svn.wordpress.org/trunk@45211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
729d4a4942
commit
27720e15a7
@ -13,7 +13,7 @@
|
||||
* @return string The HTTP protocol. Default: HTTP/1.0.
|
||||
*/
|
||||
function wp_get_server_protocol() {
|
||||
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
||||
$protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : '';
|
||||
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {
|
||||
$protocol = 'HTTP/1.0';
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-45399';
|
||||
$wp_version = '5.3-alpha-45400';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user