Skip to content

Commit 4f5001b

Browse files
committed
Fix Undefined property: stdClass::$xxx error.
1 parent 5bac8cf commit 4f5001b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jobs/DataTableExportJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function handle()
7979
$cells = collect();
8080
$columns->map(function (Column $column, $index) use ($row, $cells) {
8181
$property = $column['data'];
82-
$value = $row->{$property};
82+
$value = $row->{$property} ?? '';
8383

8484
if ($value instanceof \DateTime || $this->wantsDateFormat($column)) {
8585
$date = $value ? Date::dateTimeToExcel(Carbon::parse($value)) : '';

0 commit comments

Comments
 (0)