From 81d774fcf7e620c0fbec6fda8562848e8c4cc88f Mon Sep 17 00:00:00 2001 From: Matt Peel Date: Wed, 17 Oct 2007 03:26:25 +0000 Subject: [PATCH] Removed one more notice from SearchForm when nothing was found git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43508 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- search/SearchForm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/search/SearchForm.php b/search/SearchForm.php index 4ec5ea016..2675a6aa7 100755 --- a/search/SearchForm.php +++ b/search/SearchForm.php @@ -170,7 +170,9 @@ class SearchForm extends Form { foreach($records as $record) $objects[] = new $record['ClassName']($record); - $doSet = new DataObjectSet($objects); + + if(isset($objects)) $doSet = new DataObjectSet($objects); + else $doSet = new DataObjectSet(); $doSet->setPageLimits(isset($_GET['start']) ? (int)$_GET['start'] : 0, $numPerPage, $totalCount); return $doSet;