[wp-trac] [WordPress Trac] #27866: Multisite subdirectory install breaks if network path has uppercase letters
WordPress Trac
noreply at wordpress.org
Thu Apr 17 18:15:14 UTC 2014
#27866: Multisite subdirectory install breaks if network path has uppercase letters
----------------------------+-------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9.1
Component: Bootstrap/Load | Version: 3.9
Severity: normal | Keywords:
Focuses: multisite |
----------------------------+-------------------
Report received via email:
-----
When a user installs WordPress MultiSite having two segments in the
relative path AND having a uppercase character in either of the segments
i.e. for Eg : http://example.com/wp6MU/wp6MU/
In this case WordPress is not able to load the "$current_blog" in wp-
includes/wp-settings.php Line 64 because when the function
get_site_by_path() is called in ms-load.php the use of array_slice() on
Line 308 skips the $path_segments to only one key instead of two keys. So
the SELECT query on Line 355 ms-load.php becomes :
{{{
SELECT * FROM wp_blogs WHERE domain = 'example.com' AND path IN
('/wp6MU/', '/') ORDER BY CHAR_LENGTH(path) DESC LIMIT 1
}}}
instead of :
{{{
SELECT * FROM wp_blogs WHERE domain = 'example.com' AND path IN
('/wp6MU/wp6MU/', '/') ORDER BY CHAR_LENGTH(path) DESC LIMIT 1
}}}
Note : This happens only if there is atleast one uppercase character in
"PATH_CURRENT_SITE" because if all are lower case it goes into the first
if condition on Line 56 ms-settings.php and if there is an upper case
character it goes to else part on Line 62. It happens because $path uses
strtolower() and $current_site->path has the upper case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27866>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list