Fix type warning on php8.1, refs #9770
parent
dc84dbbbf7
commit
18e268556d
|
@ -343,7 +343,9 @@ EOT
|
|||
}
|
||||
|
||||
if (null === $stability) {
|
||||
if (preg_match('{^[^,\s]*?@('.implode('|', array_keys(BasePackage::$stabilities)).')$}i', $packageVersion, $match)) {
|
||||
if (null === $packageVersion) {
|
||||
$stability = 'stable';
|
||||
} elseif (preg_match('{^[^,\s]*?@('.implode('|', array_keys(BasePackage::$stabilities)).')$}i', $packageVersion, $match)) {
|
||||
$stability = $match[1];
|
||||
} else {
|
||||
$stability = VersionParser::parseStability($packageVersion);
|
||||
|
|
Loading…
Reference in New Issue