Changeset 45978 for branches/4.6
- Timestamp:
- 09/04/2019 05:11:07 PM (5 years ago)
- Location:
- branches/4.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-includes/pluggable.php
r40185 r45978 1297 1297 if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) ) 1298 1298 return $default; 1299 1300 if ( ! isset( $lp['host'] ) && ! empty( $lp['path'] ) && '/' !== $lp['path'][0] ) { 1301 $path = ''; 1302 if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { 1303 $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' ); 1304 } 1305 $location = '/' . ltrim( $path . '/', '/' ) . $location; 1306 } 1299 1307 1300 1308 // Reject if certain components are set but host is not. This catches urls like https:host.com for which parse_url does not set the host field.
Note: See TracChangeset
for help on using the changeset viewer.