Ticket #6667: canonical_test_for_vars.patch
File canonical_test_for_vars.patch, 1.2 KB (added by , 16 years ago) |
---|
-
wp-includes/canonical.php
old new 171 171 } 172 172 173 173 // Always trailing slash the 'home' URL 174 if ( $redirect['path'] == $user_home['path'] ) 174 if ( isset( $redirect['path'], $user_home['path'] ) 175 && $redirect['path'] == $user_home['path'] ) 175 176 $redirect['path'] = trailingslashit($redirect['path']); 176 177 177 178 // Ignore differences in host capitalization, as this can lead to infinite redirects 178 179 if ( strtolower($original['host']) == strtolower($redirect['host']) ) 179 180 $redirect['host'] = $original['host']; 180 181 181 if ( array($original['host'], $original['port'], $original['path'], $original['query']) !== array($redirect['host'], $redirect['port'], $redirect['path'], $redirect['query']) ) { 182 if ( isset( $original['port'] ) 183 && array($original['host'], $original['port'], $original['path'], $original['query']) !== array($redirect['host'], $redirect['port'], $redirect['path'], $redirect['query']) ) { 182 184 $redirect_url = $redirect['scheme'] . '://' . $redirect['host']; 183 185 if ( isset($redirect['port']) ) 184 186 $redirect_url .= ':' . $redirect['port'];