mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Avoid a crash when a PHP extension has no version
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
6163894573
commit
2b0bc2bb2c
1 changed files with 4 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ class PlatformRepository {
|
|||
$ext = new \ReflectionExtension($name);
|
||||
try {
|
||||
$prettyVersion = $ext->getVersion();
|
||||
$prettyVersion = $this->normalizeVersion($prettyVersion);
|
||||
$prettyVersion = $this->normalizeVersion($prettyVersion ?? '0');
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
$prettyVersion = '0';
|
||||
$prettyVersion = $this->normalizeVersion($prettyVersion);
|
||||
|
|
@ -109,6 +109,9 @@ class PlatformRepository {
|
|||
continue 2;
|
||||
}
|
||||
|
||||
if ($prettyVersion === null) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
$prettyVersion = $this->normalizeVersion($prettyVersion);
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue