Skip to content

Commit de31a3f

Browse files
authored
[5.1] updater contraintchecker stability check early return (#43497)
1 parent 375d01a commit de31a3f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

libraries/src/Updater/ConstraintChecker.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ public function check(array $candidate, $minimumStability = Updater::STABILITY_S
9393
return false;
9494
}
9595

96+
// Check stability, assume true when not set
97+
if (
98+
isset($candidate['stability'])
99+
&& !$this->checkStability($candidate['stability'], $minimumStability)
100+
) {
101+
return false;
102+
}
103+
96104
$result = true;
97105

98106
// Check php_minimum, assume true when not set
@@ -111,14 +119,6 @@ public function check(array $candidate, $minimumStability = Updater::STABILITY_S
111119
$result = false;
112120
}
113121

114-
// Check stability, assume true when not set
115-
if (
116-
isset($candidate['stability'])
117-
&& !$this->checkStability($candidate['stability'], $minimumStability)
118-
) {
119-
$result = false;
120-
}
121-
122122
return $result;
123123
}
124124

0 commit comments

Comments
 (0)