Removed 2 notices from SearchForm

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43507 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Matt Peel 2007-10-17 03:22:37 +00:00
parent 3cd1a621b5
commit e4d2b1ffa2

View File

@ -127,7 +127,8 @@ class SearchForm extends Form {
if($this->showInSearchTurnOn) $extraFilter .= " AND showInSearch <> 0";
$limit = (int)$_GET['start'] . ", " . (int) $numPerPage;
$start = isset($_GET['start']) ? (int)$_GET['start'] : 0;
$limit = $start . ", " . (int) $numPerPage;
$notMatch = $invertedMatch ? "NOT " : "";
if($keywords) {
@ -171,7 +172,7 @@ class SearchForm extends Form {
$objects[] = new $record['ClassName']($record);
$doSet = new DataObjectSet($objects);
$doSet->setPageLimits($_GET['start'], $numPerPage, $totalCount);
$doSet->setPageLimits(isset($_GET['start']) ? (int)$_GET['start'] : 0, $numPerPage, $totalCount);
return $doSet;