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