Skip to content

Commit

Permalink
Update RangeValue.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar authored Nov 22, 2018
1 parent 7c5fb48 commit 86e406a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/web/jsonld/RangeValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct($value)

public function ensureRange($min, $max)
{
if (!in_array($this->_value, range($min, $max))) {
if ($this->_value < $min || $this->_value > $max) {
throw new InvalidConfigException("Value {$this->_value} must be min {$min} or max {$max}.");
}
}
Expand All @@ -25,4 +25,4 @@ public function getValue()
{
return $this->_value;
}
}
}

0 comments on commit 86e406a

Please sign in to comment.