plugin_basename() fails on case-sensitive plugin directories
|Reported by:||bungeshea||Owned by:|
When WP_PLUGIN_DIR has slightly different casing to the actual path, plugin_basename() returns the full path to the plugin file.
If WP_PLUGIN_DIR is set to C:/Website/wp-content/plugins, but the actual file-system path is C:/Website/wp-content/Plugins, plugin_basename() will return the full path to the plugin file.
The plugin_basename() function uses a preg_replace statement to find path to the plugin relative from WP_PLUGIN_DIR. If the actual path to the plugin directory does not match case to WP_PLUGIN_DIR, the preg_replace will fail. This is because preg_replace is not case sensitive.
Change History (5)
comment:1 in reply to: ↑ description rmccue — 16 months ago
- Severity changed from normal to minor
- Version changed from trunk to 1.5
- Resolution set to wontfix
- Severity changed from minor to trivial
- Status changed from new to closed