WordPress.org

Make WordPress Core

Ticket #47005: 47005.patch

File 47005.patch, 551 bytes (added by thakkarhardik, 12 months ago)
  • src/wp-includes/load.php

     
    1313 * @return string The HTTP protocol. Default: HTTP/1.0.
    1414 */
    1515function wp_get_server_protocol() {
    16         $protocol = $_SERVER['SERVER_PROTOCOL'];
     16        $protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : '';
    1717        if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {
    1818                $protocol = 'HTTP/1.0';
    1919        }