From 1512d3d4d120abaa87b434952730723dba4b7e28 Mon Sep 17 00:00:00 2001 From: loru88 Date: Wed, 11 Oct 2017 16:39:25 +0200 Subject: [PATCH] [Validator] added magic method __isset() to File Constraint class --- src/Symfony/Component/Validator/CHANGELOG.md | 1 + src/Symfony/Component/Validator/Constraints/File.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md index 740e23b09051e..b5b623a301d6b 100644 --- a/src/Symfony/Component/Validator/CHANGELOG.md +++ b/src/Symfony/Component/Validator/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG the `Url::CHECK_DNS_TYPE_*` constants values and will throw an exception in Symfony 4.0 * added min/max amount of pixels check to `Image` constraint via `minPixels` and `maxPixels` * added a new "propertyPath" option to comparison constraints in order to get the value to compare from an array or object + * added magic method `__isset()` to `File` constraint class 3.3.0 ----- diff --git a/src/Symfony/Component/Validator/Constraints/File.php b/src/Symfony/Component/Validator/Constraints/File.php index 4d4c68d7fd9fb..5cc3a7313f7a5 100644 --- a/src/Symfony/Component/Validator/Constraints/File.php +++ b/src/Symfony/Component/Validator/Constraints/File.php @@ -88,6 +88,15 @@ public function __get($option) return parent::__get($option); } + public function __isset($option) + { + if ('maxSize' === $option) { + return true; + } + + return parent::__isset($option); + } + private function normalizeBinaryFormat($maxSize) { $factors = array( pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy