Ticket #41577: canonical.php.patch
File canonical.php.patch, 944 bytes (added by , 7 years ago) |
---|
-
canonical.php
old new 71 71 return; 72 72 } 73 73 74 // Notice fixing 75 if ( !isset($original['path']) ) 76 $original['path'] = ''; 77 if ( !isset($original['query']) ) 78 $original['query'] = ''; 79 74 80 $redirect = $original; 75 81 $redirect_url = false; 76 82 77 // Notice fixing78 if ( !isset($redirect['path']) )79 $redirect['path'] = '';80 if ( !isset($redirect['query']) )81 $redirect['query'] = '';82 83 83 84 // If the original URL ended with non-breaking spaces, they were almost 84 85 // certainly inserted by accident. Let's remove them, so the reader doesn't … … 567 568 if ( ! empty( $parsed_url['port'] ) ) { 568 569 $url .= ':' . $parsed_url['port']; 569 570 } 570 $url .= $parsed_url['path']; 571 if ( isset( $parsed_url['path'] ) ) 572 $url .= $parsed_url['path']; 571 573 if ( ! empty( $parsed_url['query'] ) ) { 572 574 $url .= '?' . $parsed_url['query']; 573 575 }