1
0
Fork 0

Fix phpversion() returning false when an extension has no version, fixes #10631

pull/10632/head
Jordi Boggiano 2022-03-17 10:34:40 +01:00
parent a2bdf72fa4
commit dec123770f
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 7 additions and 7 deletions

View File

@ -98,7 +98,12 @@ class Runtime
*/
public function getExtensionVersion(string $extension): string
{
return phpversion($extension);
$version = phpversion($extension);
if ($version === false) {
$version = '0';
}
return $version;
}
/**

View File

@ -618,13 +618,8 @@ class PlatformRepository extends ArrayRepository
/**
* Parses the version and adds a new package to the repository
*
* @param string $name
* @param null|string $prettyVersion
*
* @return void
*/
private function addExtension(string $name, ?string $prettyVersion): void
private function addExtension(string $name, string $prettyVersion): void
{
$extraDescription = null;