MDL-86311 core: ensure component is normalised prior to comparison.

This commit is contained in:
Paul Holden
2025-08-19 09:13:36 +01:00
parent 4c844801bb
commit 76e481b9ce
+2 -5
View File
@@ -293,14 +293,11 @@ class util {
public static function normalise_component_path(
string $component,
): string {
if ($component === 'core') {
return $component;
}
[$type, $subsystem] = \core\component::normalize_component($component);
if ($type === 'core') {
if ($type === 'core' && $subsystem !== null) {
return str_replace('core_', '', $subsystem);
}
return $component ?? '';
return $component;
}
}