Skip to content

Commit

Permalink
throwing exceptions from __toString() is allowed since PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 18, 2019
1 parent 35adc09 commit 12a72c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ public function __toString(): string
return $this->getRenderer()->render($this);

} catch (\Throwable $e) {
if (func_num_args()) {
if (func_num_args() || PHP_VERSION_ID >= 70400) {
throw $e;
}
trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR);
Expand Down

0 comments on commit 12a72c9

Please sign in to comment.