From e8ccff3d0b511d7430f2a0dee4ee03701cccaeff Mon Sep 17 00:00:00 2001 From: Olaf Braun Date: Tue, 29 Aug 2023 12:03:19 +0200 Subject: [PATCH] Fix validation in UploadFormField::maximumImageWidth() Closes #5636 [Tim: rewritten the commit message] --- .../lib/system/form/builder/field/UploadFormField.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php index bfc8b79038..0828dabff6 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php @@ -697,7 +697,7 @@ class UploadFormField extends AbstractFormField } $minimumImageWidth = $this->getMinimumImageWidth(); - if ($maximumImageWidth !== null && $minimumImageWidth > $maximumImageWidth) { + if ($minimumImageWidth !== null && $minimumImageWidth > $maximumImageWidth) { throw new \InvalidArgumentException( "Maximum image width ({$maximumImageWidth}) cannot be smaller than minimum image width ({$minimumImageWidth}) for field '{$this->getId()}'." ); -- 2.20.1