mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-27 08:16:41 +01:00
Properly exit the nested foreach when a matching dependency is found
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user