diff --git a/module/VuFind/src/VuFind/XSLT/Importer.php b/module/VuFind/src/VuFind/XSLT/Importer.php index 72f1934ae51..7eef17cb3d4 100644 --- a/module/VuFind/src/VuFind/XSLT/Importer.php +++ b/module/VuFind/src/VuFind/XSLT/Importer.php @@ -151,7 +151,7 @@ protected function generateXML($xmlFile, $properties) */ protected function throwMissingClassException(string $class): void { - $parts = explode('\\', $class); + $parts = explode('\\', ltrim($class, '\\')); $namespace = count($parts) > 1 ? array_shift($parts) : null; $localModules = ($localModulesEnv = getenv('VUFIND_LOCAL_MODULES')) ? array_map('trim', explode(',', $localModulesEnv)) : [];