You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (null === $data || (\is_string($data) &&'' === trim($data))) {
95
-
throw NotNormalizableValueException::createForUnexpectedDataType('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.', $data, [Type::BUILTIN_TYPE_STRING], $context['deserialization_path'] ?? null, true);
94
+
if (null === $data || !\is_string($data) ||'' === trim($data)) {
95
+
throw NotNormalizableValueException::createForUnexpectedDataType('The data is either not an string, an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.', $data, [Type::BUILTIN_TYPE_STRING], $context['deserialization_path'] ?? null, true);
96
96
}
97
97
98
98
if (null !== $dateTimeFormat) {
@@ -110,10 +110,14 @@ public function denormalize($data, string $type, string $format = null, array $c
$this->expectExceptionMessage('The data is either not an string, an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
$this->expectExceptionMessage('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
256
+
$this->expectExceptionMessage('The data is either not an string, an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
$this->expectExceptionMessage('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
263
+
$this->expectExceptionMessage('The data is either not an string, an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
$this->expectExceptionMessage('The data is either an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
270
+
$this->expectExceptionMessage('The data is either not an string, an empty string or null, you should pass a string that can be parsed with the passed format or a valid DateTime string.');
0 commit comments