WordPress.org

Make WordPress Core

Ticket #16885: 19885.diff

File 19885.diff, 641 bytes (added by hakre, 3 years ago)

default reson phrase is string of status code

  • wp-includes/class-http.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    439439                                continue; 
    440440 
    441441                        if ( false === strpos($tempheader, ':') ) { 
    442                                 list( , $response['code'], $response['message']) = explode(' ', $tempheader, 3); 
     442                                $stack = explode(' ', $tempheader, 3); 
     443                                $stack[] = (string) $stack[1]; // default reson phrase is string of status code 
     444                                list( , $response['code'], $response['message']) = $stack; 
    443445                                continue; 
    444446                        } 
    445447