Skip to content

Commit 6f37601

Browse files
committed
Fix warning when fieldtype is returned as string
Signed-off-by: Philipp Daun <post@philippdaun.net>
1 parent bb6ad26 commit 6f37601

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

DashboardPanelCollection.module

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ class DashboardPanelCollection extends DashboardPanel
128128
$class = $column->class;
129129

130130
$field = $this->fields->get($markup);
131-
$fieldtype = $field ? "$field->type" : null;
131+
$fieldtype = is_object($field)
132+
? "$field->type"
133+
: (is_string($field)
134+
? $field
135+
: null);
136+
132137
$content = null;
133138

134139
// Special case: action links

0 commit comments

Comments
 (0)