More graceful handling of missing GET data in ModelAdmin

See https://github.com/silverstripe/silverstripe-cms/pull/253
This commit is contained in:
Ingo Schommer 2012-12-04 11:38:32 +01:00
parent 6eb597a2d5
commit 75e58c9508

View File

@ -696,7 +696,11 @@ class ModelAdmin_CollectionController extends Controller {
$summaryFields = $this->columnsAvailable(); $summaryFields = $this->columnsAvailable();
if($selectedOnly && isset($searchCriteria['ResultAssembly'])) { if(
$selectedOnly
&& isset($searchCriteria['ResultAssembly'])
&& !empty($searchCriteria['ResultAssembly'])
) {
$resultAssembly = $searchCriteria['ResultAssembly']; $resultAssembly = $searchCriteria['ResultAssembly'];
if(!is_array($resultAssembly)) { if(!is_array($resultAssembly)) {
$explodedAssembly = split(' *, *', $resultAssembly); $explodedAssembly = split(' *, *', $resultAssembly);