Fixes bug in valueFrom when relation is null

This commit is contained in:
Samuel Georges 2015-09-02 17:28:22 +10:00
parent 7a2c0eea07
commit 2619de0ae7
1 changed files with 1 additions and 1 deletions

View File

@ -767,7 +767,7 @@ class Lists extends WidgetBase
$value = implode(', ', $record->{$columnName}->lists($column->valueFrom)); $value = implode(', ', $record->{$columnName}->lists($column->valueFrom));
} }
elseif ($this->isColumnRelated($column) || $this->isColumnPivot($column)) { elseif ($this->isColumnRelated($column) || $this->isColumnPivot($column)) {
$value = $record->{$columnName}->{$column->valueFrom}; $value = $record->{$columnName} ? $record->{$columnName}->{$column->valueFrom} : null;
} }
else { else {
$value = null; $value = null;