WordPress.org

Make WordPress Core

Ticket #16890: 16890.2.patch

File 16890.2.patch, 736 bytes (added by hakre, 7 years ago)

Fix at the place itself.

  • wp-includes/class-http.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    766766                // If location is found, then assume redirect and redirect to location.
    767767                if ( 'HEAD' != $r['method'] && isset($arrHeaders['headers']['location']) ) {
    768768                        if ( $r['redirection']-- > 0 ) {
    769                                 return $this->request($arrHeaders['headers']['location'], $r);
     769                                $location = (array) $arrHeaders['headers']['location'];
     770                                return $this->request($location[0], $r);
    770771                        } else {
    771772                                return new WP_Error('http_request_failed', __('Too many redirects.'));
    772773                        }