From ce8faabdc3c281696d31be713039d5993aca3c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20L=C3=ADbal?= Date: Mon, 8 Oct 2018 11:01:16 +0200 Subject: [PATCH] Add the object to string cast to the Row::getId method --- src/Row.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Row.php b/src/Row.php index b1efdc25..3400ec45 100644 --- a/src/Row.php +++ b/src/Row.php @@ -74,6 +74,10 @@ public function __construct(DataGrid $datagrid, $item, $primary_key) */ public function getId() { + if (is_object($this->id) && method_exists($this->id, '__toString')) { + return (string) $this->id; + } + return $this->id; }