Fix broken check in ValidationException

This commit is contained in:
Alex Cabal 2024-05-24 23:37:28 -05:00
parent 4574b55cac
commit fa323842f6

View file

@ -19,7 +19,7 @@ class ValidationException extends AppException{
public function Add(\Exception $exception, bool $isFatal = false): void{ public function Add(\Exception $exception, bool $isFatal = false): void{
/** @var ValidationException $exception */ /** @var ValidationException $exception */
if($exception instanceof static){ if(is_a($exception, ValidationException::class)){
foreach($exception->Exceptions as $childException){ foreach($exception->Exceptions as $childException){
$this->Add($childException); $this->Add($childException);
} }