diff --git a/lib/private/App/PlatformRepository.php b/lib/private/App/PlatformRepository.php index 4166c2ead03b0..9b94c0b07bcc7 100644 --- a/lib/private/App/PlatformRepository.php +++ b/lib/private/App/PlatformRepository.php @@ -50,7 +50,11 @@ protected function initialize(): array { $ext = new \ReflectionExtension($name); try { $prettyVersion = $ext->getVersion(); - $prettyVersion = $this->normalizeVersion($prettyVersion); + /** @psalm-suppress TypeDoesNotContainNull + * @psalm-suppress RedundantCondition + * TODO Remove these annotations once psalm fixes the method signature ( https://github.com/vimeo/psalm/pull/8655 ) + */ + $prettyVersion = $this->normalizeVersion($prettyVersion ?? '0'); } catch (\UnexpectedValueException $e) { $prettyVersion = '0'; $prettyVersion = $this->normalizeVersion($prettyVersion); @@ -111,6 +115,9 @@ protected function initialize(): array { continue 2; } + if ($prettyVersion === null) { + continue; + } try { $prettyVersion = $this->normalizeVersion($prettyVersion); } catch (\UnexpectedValueException $e) {