Changeset 45983 for branches/4.2
- Timestamp:
- 09/04/2019 05:13:25 PM (5 years ago)
- Location:
- branches/4.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2
-
branches/4.2/src/wp-includes/pluggable.php
r40189 r45983 1303 1303 if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) ) 1304 1304 return $default; 1305 1306 if ( ! isset( $lp['host'] ) && ! empty( $lp['path'] ) && '/' !== $lp['path'][0] ) { 1307 $path = ''; 1308 if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { 1309 $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' ); 1310 } 1311 $location = '/' . ltrim( $path . '/', '/' ) . $location; 1312 } 1305 1313 1306 1314 // 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.