Skip to content

Commit

Permalink
Fixed erroneous priority comparison which matched the correct case in…
Browse files Browse the repository at this point in the history
…stead of the exception
  • Loading branch information
lzehnder authored and chfsx committed Feb 22, 2022
1 parent 8daf7c1 commit 0114f60
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getPriority() : int
*/
final public function withPriority(int $priority) : LayoutModification
{
if ((self::PRIORITY_LOW <= $priority) && ($priority <= self::PRIORITY_HIGH)) {
if ((self::PRIORITY_LOW > $priority) || ($priority > self::PRIORITY_HIGH)) {
throw new LogicException("\$priority MUST be between LayoutModification::PRIORITY_LOW, LayoutModification::PRIORITY_MEDIUM or LayoutModification::PRIORITY_HIGH");
}
$clone = clone $this;
Expand Down

0 comments on commit 0114f60

Please sign in to comment.