From be8cb4eef6c8d5032504b128e7e5f4a050e93617 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 1 Nov 2019 15:41:54 +0100 Subject: [PATCH] fix exception messages --- src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php | 2 +- src/Symfony/Component/Form/Extension/Core/Type/DateType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index 3bd61df513..889eb9d029 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -320,7 +320,7 @@ class DateTimeType extends AbstractType }); $resolver->setNormalizer('html5', function (Options $options, $html5) { if ($html5 && self::HTML5_FORMAT !== $options['format']) { - throw new LogicException(sprintf('Cannot use the "format" option of %s when the "html5" option is disabled.', self::class)); + throw new LogicException(sprintf('Cannot use the "format" option of %s when the "html5" option is enabled.', self::class)); } return $html5; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index c50d43b4c1..1b320e6970 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -311,7 +311,7 @@ class DateType extends AbstractType $resolver->setNormalizer('html5', function (Options $options, $html5) { if ($html5 && 'single_text' === $options['widget'] && self::HTML5_FORMAT !== $options['format']) { - throw new LogicException(sprintf('Cannot use the "format" option of %s when the "html5" option is disabled.', self::class)); + throw new LogicException(sprintf('Cannot use the "format" option of %s when the "html5" option is enabled.', self::class)); } return $html5;