[Validator] added magic method __isset() to File Constraint class

This commit is contained in:
loru88 2017-10-11 16:39:25 +02:00 committed by Fabien Potencier
parent 262b4f3b83
commit 9efb76572a
1 changed files with 9 additions and 0 deletions

View File

@ -88,6 +88,15 @@ class File extends Constraint
return parent::__get($option);
}
public function __isset($option)
{
if ('maxSize' === $option) {
return true;
}
return parent::__isset($option);
}
private function normalizeBinaryFormat($maxSize)
{
$sizeInt = (int) $maxSize;