Changeset 45975
- Timestamp:
- 09/04/2019 05:07:33 PM (4 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/pluggable.php
r43349 r45975 1342 1342 if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) ) 1343 1343 return $default; 1344 1345 if ( ! isset( $lp['host'] ) && ! empty( $lp['path'] ) && '/' !== $lp['path'][0] ) { 1346 $path = ''; 1347 if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { 1348 $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' ); 1349 } 1350 $location = '/' . ltrim( $path . '/', '/' ) . $location; 1351 } 1344 1352 1345 1353 // 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.