From 6741ab67b6ad0825c5039f42eac015ab29a51093 Mon Sep 17 00:00:00 2001 From: Jason Playne Date: Wed, 15 Feb 2017 16:18:32 +0800 Subject: [PATCH] Bug Fix for Max Ratio Validation for max ratio size is backwards (it is checking for less than when it should be greater than) --- Service/Validator/AbstractImageValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Service/Validator/AbstractImageValidator.php b/Service/Validator/AbstractImageValidator.php index a6fdf3b..dc8b33c 100644 --- a/Service/Validator/AbstractImageValidator.php +++ b/Service/Validator/AbstractImageValidator.php @@ -106,7 +106,7 @@ protected function isValid($width, $height, array $configuration) } if (isset($configuration['MaxRatio']) && $this->validateConfig('MaxRatio', $configuration, true)) { - if ($ratio < $configuration['MaxRatio']) { + if ($ratio > $configuration['MaxRatio']) { throw new ValidationException('Maximum ratio must be '.$configuration['MaxRatio']); } }