mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
3cd1a621b5
commit
e4d2b1ffa2
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user