Skip to content

Commit

Permalink
FIX update defensive check on tags field method
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyImPhil committed Jan 24, 2024
1 parent 71e603a commit b3b8908
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Model/SitewideContentTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ public function updateColumns($itemType, &$columns)
'printonly' => true, // Hide on page report
'title' => _t('SilverStripe\\SiteWideContentReport\\SitewideContentReport.Tags', 'Tags'),
'datasource' => function ($record) use ($field) {
$tags = $record->$field()->column('Name');
if ($record->hasMethod($field)) {
$tags = $record->$field()->column('Name');

return implode(', ', $tags);
return implode(', ', $tags);
}

return '';
},
];
}
Expand Down

0 comments on commit b3b8908

Please sign in to comment.