WordPress.org

Make WordPress Core

Ticket #6977: 6977_fix.patch

File 6977_fix.patch, 848 bytes (added by minddog, 7 years ago)
  • wp-includes/canonical.php

     
    179179        if ( strtolower($original['host']) == strtolower($redirect['host']) ) 
    180180                $redirect['host'] = $original['host']; 
    181181 
    182         if ( array($original['host'], $original['port'], $original['path'], $original['query']) !== array($redirect['host'], $redirect['port'], $redirect['path'], $redirect['query']) ) { 
     182        if ( array($original['host'], @$original['port'], $original['path'], @$original['query'])  
     183                !== array($redirect['host'], @$redirect['port'], $redirect['path'], @$redirect['query']) ) { 
    183184                $redirect_url = $redirect['scheme'] . '://' . $redirect['host']; 
    184185                if ( isset($redirect['port']) ) 
    185186                        $redirect_url .= ':' . $redirect['port'];