Skip to content

Commit e55a65c

Browse files
committed
throwing exceptions from __toString() is allowed since PHP 7.4
1 parent 99a2c51 commit e55a65c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Forms/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ public function __toString(): string
619619
return $this->getRenderer()->render($this);
620620

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

0 commit comments

Comments
 (0)