Skip to content

Commit 0bd93d9

Browse files
committed
__toString handles Throwable errors
1 parent cadc1a6 commit 0bd93d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Database/Table/ActiveRow.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ public function __toString()
5555
{
5656
try {
5757
return (string) $this->getPrimary();
58+
} catch (\Throwable $e) {
5859
} catch (\Exception $e) {
60+
}
61+
if (isset($e)) {
5962
if (func_num_args()) {
6063
throw $e;
6164
}

0 commit comments

Comments
 (0)