Skip to content

Commit

Permalink
Merge pull request #78 from silverstripeltd/bugfix/orphaned-page-types
Browse files Browse the repository at this point in the history
FIX update defensive check on tags field method
  • Loading branch information
GuySartorelli authored Jan 24, 2024
2 parents 720336d + e6638ec commit ed176f7
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 ed176f7

Please sign in to comment.