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