From 86e406a59af5022cae8325fcb195a1010d2a7e7e Mon Sep 17 00:00:00 2001 From: Basil Date: Thu, 22 Nov 2018 17:33:10 +0100 Subject: [PATCH] Update RangeValue.php --- core/web/jsonld/RangeValue.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/web/jsonld/RangeValue.php b/core/web/jsonld/RangeValue.php index 1938c009e..b69e41a8a 100644 --- a/core/web/jsonld/RangeValue.php +++ b/core/web/jsonld/RangeValue.php @@ -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}."); } } @@ -25,4 +25,4 @@ public function getValue() { return $this->_value; } -} \ No newline at end of file +}