diff --git a/search/plugins/ezsolr/ezsolr.php b/search/plugins/ezsolr/ezsolr.php index 436440be..d83b5ea1 100644 --- a/search/plugins/ezsolr/ezsolr.php +++ b/search/plugins/ezsolr/ezsolr.php @@ -1498,6 +1498,15 @@ protected function buildResultObjects( $resultArray, &$searchCount, $asObjects = if ( !empty( $resultArray ) ) { $result = $resultArray['response']; + if ( !is_array( $result ) || + !isset( $result['maxScore'] ) || + !isset( $result['docs'] ) || + !is_array( $result['docs'] ) ) + { + eZDebug::writeError( 'Unexpected response from Solr: ' . var_export( $result, true ), __METHOD__ ); + return $objectRes; + } + $maxScore = $result['maxScore']; $docs = $result['docs']; $localNodeIDList = array();