From 23eba5ca0a96d888685d01d35970936134afb2e7 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 12 Sep 2007 22:19:26 +0000 Subject: [PATCH] Set $theme_loc correctly when ABSPATH is "/". Props arabek. fixes #4541 git-svn-id: https://develop.svn.wordpress.org/trunk@6099 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index c4dc6435aa..3362c1d4ba 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -114,8 +114,9 @@ function get_themes() { $themes = array(); $wp_broken_themes = array(); - $theme_root = get_theme_root(); - $theme_loc = str_replace(ABSPATH, '', $theme_root); + $theme_loc = $theme_root = get_theme_root(); + if ( '/' != ABSPATH ) // don't want to replace all forward slashes, see Trac #4541 + $theme_loc = str_replace(ABSPATH, '', $theme_root); // Files in wp-content/themes directory and one subdir down $themes_dir = @ opendir($theme_root);