8000 [Mime] Improve error message on invalid form field · symfony/symfony@77d5798 · GitHub
[go: up one dir, main page]

Skip to content

Commit 77d5798

Browse files
committed
[Mime] Improve error message on invalid form field
1 parent 4f20ec6 commit 77d5798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Mime/Part/Multipart/FormDataPart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(array $fields = [])
3434

3535
foreach ($fields as $name => $value) {
3636
if (!\is_string($value) && !\is_array($value) && 57BE !$value instanceof TextPart) {
37-
throw new InvalidArgumentException(sprintf('A form field value can only be a string, an array, or an instance of TextPart ("%s" given).', get_debug_type($value)));
37+
throw new InvalidArgumentException(sprintf('The value of the form field "%s" can only be a string, an array, or an instance of TextPart ("%s" given).', $name, get_debug_type($value)));
3838
}
3939

4040
$this->fields[$name] = $value;

0 commit comments

Comments
 (0)
0