﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
12080	plugins_url() does not correctly detect mu-plugins on Windows	TheDeadMedic		"{{{
if ( $plugin !== '' && preg_match('#^' . preg_quote(WPMU_PLUGIN_DIR . DIRECTORY_SEPARATOR, '#') . '#', $plugin) ) {
    $url = WPMU_PLUGIN_URL;
} else {
    $url = WP_PLUGIN_URL;
}
}}}

Even if {{{$plugin}}} is in mu-plugins, the {{{preg_match}}} will fail on Windows systems if {{{__FILE__}}} is passed as {{{$plugin}}}, since {{{WPMU_PLUGIN_DIR}}} contains forward slashes (whereas {{{__FILE__}}} on Windows are all backslashes).

Proposed fix is to apply path formatting to {{{WPMU_PLUGIN_DIR}}} and {{{$plugin}}} found in {{{plugin_basename()}}}.

{{{
$mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs
$mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash
}}}

"	defect (bug)	closed	low	3.0	Multisite	2.9.1	minor	fixed		
