From 7e5afc39fd8ca658391c547d7e4450b36a148200 Mon Sep 17 00:00:00 2001 From: Kiel Date: Fri, 5 May 2023 12:13:14 +0100 Subject: [PATCH] Handle NULL Flag Data --- Model/IntegrityResultsRegistry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/IntegrityResultsRegistry.php b/Model/IntegrityResultsRegistry.php index b3db045..07a3152 100644 --- a/Model/IntegrityResultsRegistry.php +++ b/Model/IntegrityResultsRegistry.php @@ -65,7 +65,7 @@ public function getFailedMatches(array $packages = []): array $failures = []; $threshold = $this->moduleConfig->getSansecComposerIntegrityMatchThreshold(); - foreach ($packages ?: $this->getLastResults() as $package) { + foreach ($packages ?: $this->getLastResults() ?? [] as $package) { $package = (array)$package; if ((int)$package['percentage'] < $threshold) {