Allow Or modules without version also

This commit is contained in:
Sukhwinder Dhillon 2021-10-14 10:11:27 +02:00
parent b1c48a9069
commit 9cb9387206

View File

@ -1008,6 +1008,8 @@ class Module
foreach ($orParts as $orPart) { foreach ($orParts as $orPart) {
if (preg_match('/^([\w\-\/]+)\s+\((.+)\)$/', $orPart, $m)) { if (preg_match('/^([\w\-\/]+)\s+\((.+)\)$/', $orPart, $m)) {
$metadata->{$key}['|' . $i][$m[1]] = $m[2]; $metadata->{$key}['|' . $i][$m[1]] = $m[2];
} elseif (preg_match('/^([\w\-\/]+)$/', $orPart, $m)) {
$metadata->{$key}['|' . $i][$m[1]] = null;
} }
} }
} elseif (preg_match('/^([\w\-\/]+)\s+\((.+)\)$/', $part, $m)) { } elseif (preg_match('/^([\w\-\/]+)\s+\((.+)\)$/', $part, $m)) {