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 543118c commit ad19b1dCopy full SHA for ad19b1d
src/BaseDocument.php
@@ -93,8 +93,13 @@ public function validate(): bool
93
$this->validator = new Validator($this->schema);
94
}
95
96
- if (!$result = $this->validator->check($this->data)) {
97
- $this->error = $this->validator->getLastError();
+ try {
+ if (!$result = $this->validator->check($this->data)) {
98
+ $this->error = $this->validator->getLastError();
99
+ }
100
+ } catch (\RuntimeException $e) {
101
+ $result = false;
102
+ $this->error = $e->getMessage();
103
104
105
return $result;
0 commit comments