Fix phpversion() returning false when an extension has no version, fixes #10631
parent
a2bdf72fa4
commit
dec123770f
|
@ -98,7 +98,12 @@ class Runtime
|
||||||
*/
|
*/
|
||||||
public function getExtensionVersion(string $extension): string
|
public function getExtensionVersion(string $extension): string
|
||||||
{
|
{
|
||||||
return phpversion($extension);
|
$version = phpversion($extension);
|
||||||
|
if ($version === false) {
|
||||||
|
$version = '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $version;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -618,13 +618,8 @@ class PlatformRepository extends ArrayRepository
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the version and adds a new package to the repository
|
* 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;
|
$extraDescription = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue