Fix results aggregation in SolrIndex (ArrayAccess broken)

Needs to use push() explicitly, native operators don't
seem to work on ArrayList (see http://open.silverstripe.org/ticket/7686)
This commit is contained in:
Ingo Schommer 2012-07-19 14:35:24 +02:00
parent 4766794cea
commit b6aa87d116
1 changed files with 2 additions and 2 deletions

View File

@ -268,9 +268,9 @@ abstract class SolrIndex extends SearchIndex {
foreach ($res->response->docs as $doc) {
$result = DataObject::get_by_id($doc->ClassName, $doc->ID);
if ($result) $results[] = $result;
if($result) $results->push($result);
}
$ret = array();
$ret['Matches'] = new PaginatedList($results);
$ret['Matches']->setLimitItems(false);