Libraries: Only attempt a partial match if the library name contains a slash

fixes #4971
This commit is contained in:
Johannes Meyer 2023-01-11 14:16:13 +01:00
parent cbf8cfc738
commit 8837fea7a4
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class Libraries implements IteratorAggregate
$libraryName = $library->getName();
if ($libraryName === $name) {
return $library;
} elseif (explode('/', $libraryName)[1] === $name) {
} elseif (strpos($libraryName, '/') !== false && explode('/', $libraryName)[1] === $name) {
// Also return libs which only partially match
$candidate = $library;
}