Skip to content

Commit

Permalink
Bug Fix for Max Ratio
Browse files Browse the repository at this point in the history
Validation for max ratio size is backwards (it is checking for less than when it should be greater than)
  • Loading branch information
bluntelk authored and jbouzekri committed Feb 15, 2017
1 parent b4a3af6 commit 6741ab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/Validator/AbstractImageValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
}
Expand Down

0 comments on commit 6741ab6

Please sign in to comment.