From a3f33742055cc49bad564bc45a15fc7efc7607c8 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 4 Jun 2009 21:12:16 +0000 Subject: [PATCH] BUGFIX Don't throw array error when no result columns are selected in ModelAdmin git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@78425 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/ModelAdmin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php index c7bf2ba3..6ab502ae 100644 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -642,8 +642,9 @@ class ModelAdmin_CollectionController extends Controller { $summaryFields = $this->columnsAvailable(); - if($selectedOnly) { - $resultAssembly = $searchCriteria['ResultAssembly']; + $resultAssembly = $searchCriteria['ResultAssembly']; + if($selectedOnly && $resultAssembly) { + if(!is_array($resultAssembly)) { $explodedAssembly = split(' *, *', $resultAssembly); $resultAssembly = array();