Ticket #33498: get_home_patch_2_fixed.patch
| File get_home_patch_2_fixed.patch, 867 bytes (added by , 10 years ago) |
|---|
-
wp-admin/includes/file.php
a b 81 81 $siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' ); 82 82 if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) { 83 83 $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */ 84 $pos = strripos( str_replace( '\\', '/', $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) ); 85 $home_path = substr( $_SERVER['SCRIPT_FILENAME'], 0, $pos ); 84 $script_filename = wp_unslash( $_SERVER['SCRIPT_FILENAME'] ); 85 $pos = strripos( str_replace( '\\', '/', $script_filename ), trailingslashit( $wp_path_rel_to_home ) ); 86 $home_path = substr( $script_filename, 0, $pos ); 86 87 $home_path = trailingslashit( $home_path ); 87 88 } else { 88 89 $home_path = ABSPATH;