mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Fixed ModelAdmin->getResultsTable() to only apply summary field formatting if at least one field exists, to avoid array_fill() errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@115184 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
172ad1e418
commit
102ba8b424
@ -740,7 +740,12 @@ class ModelAdmin_CollectionController extends Controller {
|
|||||||
$tf->setFieldListCsv($exportFields);
|
$tf->setFieldListCsv($exportFields);
|
||||||
|
|
||||||
$url = '<a href=\"' . $this->Link() . '/$ID/edit\">$value</a>';
|
$url = '<a href=\"' . $this->Link() . '/$ID/edit\">$value</a>';
|
||||||
$tf->setFieldFormatting(array_combine(array_keys($summaryFields), array_fill(0,count($summaryFields), $url)));
|
if(count($summaryFields)) {
|
||||||
|
$tf->setFieldFormatting(array_combine(
|
||||||
|
array_keys($summaryFields),
|
||||||
|
array_fill(0,count($summaryFields), $url)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
return $tf;
|
return $tf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user