Skip to content

Commit

Permalink
Add the object to string cast to the Row::getId method
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslavlibal authored and Milan Felix Šulc committed Oct 8, 2018
1 parent f7706ae commit ce8faab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Row.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ce8faab

Please sign in to comment.