Skip to content

Commit 671c233

Browse files
committed
throwing exceptions from __toString() is allowed since PHP 7.4
1 parent cacc110 commit 671c233

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Table/ActiveRow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __toString()
5858
try {
5959
return (string) $this->getPrimary();
6060
} catch (\Throwable $e) {
61-
if (func_num_args()) {
61+
if (func_num_args() || PHP_VERSION_ID >= 70400) {
6262
throw $e;
6363
}
6464
trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR);

0 commit comments

Comments
 (0)