Changeset 45980
- Timestamp:
- 09/04/2019 05:11:47 PM (5 years ago)
- Location:
- branches/4.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.5
-
branches/4.5/src/wp-includes/pluggable.php
r40186 r45980 1290 1290 if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) ) 1291 1291 return $default; 1292 1293 if ( ! isset( $lp['host'] ) && ! empty( $lp['path'] ) && '/' !== $lp['path'][0] ) { 1294 $path = ''; 1295 if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { 1296 $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' ); 1297 } 1298 $location = '/' . ltrim( $path . '/', '/' ) . $location; 1299 } 1292 1300 1293 1301 // 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.