Changeset 45977
- Timestamp:
- 09/04/2019 05:10:39 PM (5 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-includes/pluggable.php
r40265 r45977 1318 1318 if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) ) 1319 1319 return $default; 1320 1321 if ( ! isset( $lp['host'] ) && ! empty( $lp['path'] ) && '/' !== $lp['path'][0] ) { 1322 $path = ''; 1323 if ( ! empty( $_SERVER['REQUEST_URI'] ) ) { 1324 $path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' ); 1325 } 1326 $location = '/' . ltrim( $path . '/', '/' ) . $location; 1327 } 1320 1328 1321 1329 // 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.