Ticket #49145: 49145.diff
File 49145.diff, 1.6 KB (added by , 4 years ago) |
---|
-
src/wp-includes/l10n.php
969 969 // If the host is the same or it's a relative URL. 970 970 if ( 971 971 ( ! isset( $content_url['path'] ) || strpos( $src_url['path'], $content_url['path'] ) === 0 ) && 972 ( ! isset( $src_url['host'] ) || $src_url['host'] === $content_url['host'] )972 ( ! isset( $src_url['host'] ) || ! isset( $content_url['host'] ) || $src_url['host'] === $content_url['host'] ) 973 973 ) { 974 974 // Make the src relative the specific plugin or theme. 975 975 if ( isset( $content_url['path'] ) ) { … … 986 986 $relative = implode( '/', $relative ); 987 987 } elseif ( 988 988 ( ! isset( $plugins_url['path'] ) || strpos( $src_url['path'], $plugins_url['path'] ) === 0 ) && 989 ( ! isset( $src_url['host'] ) || $src_url['host'] === $plugins_url['host'] )989 ( ! isset( $src_url['host'] ) || ! isset( $plugins_url['host'] ) || $src_url['host'] === $plugins_url['host'] ) 990 990 ) { 991 991 // Make the src relative the specific plugin. 992 992 if ( isset( $plugins_url['path'] ) ) { … … 1001 1001 1002 1002 $relative = array_slice( $relative, 1 ); // Remove <plugin name>. 1003 1003 $relative = implode( '/', $relative ); 1004 } elseif ( ! isset( $src_url['host'] ) || $src_url['host'] === $site_url['host'] ) {1004 } elseif ( ! isset( $src_url['host'] ) || ! isset( $site_url['host'] ) || $src_url['host'] === $site_url['host'] ) { 1005 1005 if ( ! isset( $site_url['path'] ) ) { 1006 1006 $relative = trim( $src_url['path'], '/' ); 1007 1007 } elseif ( ( strpos( $src_url['path'], trailingslashit( $site_url['path'] ) ) === 0 ) ) {