Skip to content

Commit c30692a

Browse files
authored
Update Helper.php
1 parent fa60b22 commit c30692a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Utilities/Helper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public static function getOrMethod($method)
155155
*/
156156
public static function convertToArray($row)
157157
{
158-
$data = $row instanceof Arrayable ? $row->toArray() : $row;
158+
$data = $row instanceof Arrayable ?
159+
$row->toArray() :
160+
($row instanceof \StdClass ? (array) $row : $row );
159161

160162
foreach ($data as &$value) {
161163
if (is_object($value) || is_array($value)) {

0 commit comments

Comments
 (0)