diff --git a/classes/search/ArticleSearch.inc.php b/classes/search/ArticleSearch.inc.php index 772925bb79..2ec77ad55f 100644 --- a/classes/search/ArticleSearch.inc.php +++ b/classes/search/ArticleSearch.inc.php @@ -25,9 +25,8 @@ 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 @@ -210,7 +209,7 @@ 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 437aff5056..1b0da6f2df 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit 437aff50561641e614d75863c57e60c976425000 +Subproject commit 1b0da6f2df9ba6170755507857a182916e6bba0a