check type for matches

This commit is contained in:
Art4 2025-06-04 06:51:35 +00:00
parent 1723417f43
commit ab3e54f0e1

View file

@ -43,7 +43,7 @@ final class AddonInfo
$result = preg_match("|/\*.*\*/|msU", $raw, $m);
if ($result === false || $result === 0) {
if ($result === false || $result === 0 || !is_array($m) || count($m) < 1) {
return self::fromArray($data);
}