diff --git a/classes/search/ArticleSearch.inc.php b/classes/search/ArticleSearch.inc.php index a9ce769715c..af6dacc1b9e 100644 --- a/classes/search/ArticleSearch.inc.php +++ b/classes/search/ArticleSearch.inc.php @@ -25,9 +25,8 @@ public function getSparseArray($unorderedResults, $orderBy, $orderDir, $exclude) // Calculate a well-ordered (unique) score. $resultCount = count($unorderedResults); $i = 0; - foreach ($unorderedResults as $submissionId => &$data) { - // Reference is necessary to permit modification - $data['score'] = ($resultCount * $data['count']) + $i++; + foreach ($unorderedResults as $submissionId => $data) { + $data[$submissionId]['score'] = ($resultCount * $data['count']) + $i++; } // If we got a primary sort order then apply it and use score as secondary @@ -211,7 +210,7 @@ public function getKeywordsFromSearchFilters($searchFilters) { $indexFieldMap[SUBMISSION_SEARCH_INDEX_TERMS] = 'indexTerms'; $keywords = array(); if (isset($searchFilters['query'])) { - $keywords[null] = $searchFilters['query']; + $keywords[''] = $searchFilters['query']; } foreach($indexFieldMap as $bitmap => $searchField) { if (isset($searchFilters[$searchField]) && !empty($searchFilters[$searchField])) { diff --git a/lib/pkp b/lib/pkp index 437aff50561..08a98e710a5 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit 437aff50561641e614d75863c57e60c976425000 +Subproject commit 08a98e710a5143d2e192a859eed6797a72d114e2