Skip to content
This repository was archived by the owner on Jun 19, 2022. It is now read-only.

Commit fb7d946

Browse files
author
fd6130
committed
fix bug DtoValidator
1 parent 166da71 commit fb7d946

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Dto/Validator/DtoValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function validate(DtoRequestInterface $dto)
3333
$errorMessages [] = $error->getPropertyPath() . ' => ' . $error->getMessage();
3434
}
3535

36-
throw new DtoValidationException($errorMessages);
36+
throw new DtoValidationException('', $errorMessages);
3737
}
3838
}
3939
}

src/Exception/DtoValidationException.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ class DtoValidationException extends HttpException
99
{
1010
protected $context = [];
1111

12-
/**
13-
* @param string|array $message
14-
*/
1512
public function __construct(?string $message = '', array $context = [])
1613
{
1714
$message = !empty($message) ? $message : 'DTO validation fail.';

0 commit comments

Comments
 (0)