We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f5ba21 commit 719d1bfCopy full SHA for 719d1bf
1 file changed
src/contracts/Validation/StructWrapperValidator.php
@@ -62,8 +62,8 @@ public function validate($value, $constraints = null, $groups = null): Constrain
62
$error->getInvalidValue(),
63
$error->getPlural(),
64
$error->getCode(),
65
- $error->getConstraint(),
66
- $error->getCause()
+ $error instanceof ConstraintViolation ? $error->getConstraint() : null,
+ $error instanceof ConstraintViolation ? $error->getCause() : null
67
);
68
69
$unwrappedErrors->add($unwrappedError);
0 commit comments