-
-
Notifications
You must be signed in to change notification settings - Fork 234
Closed
Milestone
Description
Winter CMS Build
1.2
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
Skripteria.SiteSearch, Winter.Blog, Winter.Pages
Issue description
The Winter PluginManager->hasPlugin() method doesn't correctly identify replaced plugins. This appears to be caused by searching the replacementMap array using the normalized identifier, however the array is keyed using non-normalized identifiers.
public function hasPlugin(PluginBase|string $plugin): bool
{
$normalized = $this->getNormalizedIdentifier($plugin);
return isset($this->plugins[$normalized]) || isset($this->replacementMap[$normalized]);
}
Steps to replicate
Create a replacement plugin with a replaced identifier
Search for the original plugin identifier using the PluginManager
Workaround
Amend the hasPlugin function in PluginManager:476 to use the non-normalized identifier when looking up in the replacementMap.
Reactions are currently unavailable
