WordPress.org

Make WordPress Core

Ticket #16889: 16889.2.patch

File 16889.2.patch, 800 bytes (added by hakre, 3 years ago)

curl_getinfo might not return string - user comment in http://www.php.net/manual/en/function.curl-getinfo.php

  • wp-includes/class-http.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    14481448                curl_close( $handle ); 
    14491449 
    14501450                // See #11305 - When running under safe mode, redirection is disabled above. Handle it manually. 
    1451                 if ( !empty($theHeaders['headers']['location']) && (ini_get('safe_mode') || ini_get('open_basedir')) ) { 
     1451                if ( ( $code = (string) $response['code'] ) && '3' === $code[0] && !empty($theHeaders['headers']['location']) && (ini_get('safe_mode') || ini_get('open_basedir')) ) { 
    14521452                        if ( $r['redirection']-- > 0 ) { 
    14531453                                return $this->request($theHeaders['headers']['location'], $r); 
    14541454                        } else {