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
This commit is contained in:
Matt Peel 2007-10-17 03:26:25 +00:00
parent e4d2b1ffa2
commit 81d774fcf7

View File

@ -170,7 +170,9 @@ class SearchForm extends Form {
foreach($records as $record) foreach($records as $record)
$objects[] = new $record['ClassName']($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); $doSet->setPageLimits(isset($_GET['start']) ? (int)$_GET['start'] : 0, $numPerPage, $totalCount);
return $doSet; return $doSet;