From a965d3b37437f06e10ac051ab79509a613d39924 Mon Sep 17 00:00:00 2001 From: ajshort Date: Sat, 9 Mar 2013 01:04:51 +1100 Subject: [PATCH] BUG: Fix grid field rendering when the list is null --- forms/gridfield/GridField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/gridfield/GridField.php b/forms/gridfield/GridField.php index 996763ea4..33a7cd830 100644 --- a/forms/gridfield/GridField.php +++ b/forms/gridfield/GridField.php @@ -326,7 +326,7 @@ class GridField extends FormField { } } - $total = $list->count(); + $total = count($list); if($total > 0) { $rows = array(); foreach($list as $idx => $record) {