From 2b3f8948f82c32102189b817321d2e3987c7e4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 8 Apr 2024 13:21:14 +0200 Subject: [PATCH] On AsyncFileExists, checks on null value for the customization of the message --- .../Validator/Constraints/AsyncFileExists.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php b/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php index c0b5ec79c..b76ddae68 100644 --- a/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php +++ b/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php @@ -21,7 +21,10 @@ final class AsyncFileExists extends Constraint public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, $payload = null) { parent::__construct($options ?? [], $groups, $payload); - $this->message = $message; + + if (null !== $message) { + $this->message = $message; + } } public function validatedBy()