From a7edaf865cd5851bbc2262b4d71c099e104378d8 Mon Sep 17 00:00:00 2001 From: Kath Young Date: Wed, 6 Sep 2023 12:45:43 +0930 Subject: [PATCH] Brevity fix per comments --- src/Eloquent/Connection.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Eloquent/Connection.php b/src/Eloquent/Connection.php index f6bad03..a9f6a9f 100644 --- a/src/Eloquent/Connection.php +++ b/src/Eloquent/Connection.php @@ -136,9 +136,7 @@ public function zohoUpsert(string $toTable, array $data, array|string $key): int foreach ($data as $rowIndex => $row) { foreach ($row as $field => $value) { - if (is_object($value) && method_exists($value, '__toString')) { - $row[$field] = $value->__toString(); - } + $row[$field] = $value instanceof \Stringable ? (string) $value : $value; } $data[$rowIndex] = $row; }