diff --git a/public/lib/classes/router/util.php b/public/lib/classes/router/util.php index eada7c17d8b..1c2011feeda 100644 --- a/public/lib/classes/router/util.php +++ b/public/lib/classes/router/util.php @@ -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; } }