From 06719a23dd12b3240d6b200cd33a4f62c1cb58d0 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Mon, 21 Dec 2020 10:55:56 -0800 Subject: [PATCH] Properly exit the nested foreach when a matching dependency is found --- classes/plugin/Admin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/plugin/Admin.php b/classes/plugin/Admin.php index 87126a35..124b64b4 100644 --- a/classes/plugin/Admin.php +++ b/classes/plugin/Admin.php @@ -1609,16 +1609,16 @@ class Admin foreach ($notification['dependencies'] as $dependency => $constraints) { if ($dependency === 'grav') { if (!Semver::satisfies(GRAV_VERSION, $constraints)) { - continue; + continue 2; } } else { $packages = array_merge($this->plugins()->toArray(), $this->themes()->toArray()); if (!isset($packages[$dependency])) { - continue; + continue 2; } else { $version = $packages[$dependency]['version']; if (!Semver::satisfies($version, $constraints)) { - continue; + continue 2; } } }