diff --git a/Lib/SolrPhpClient/Apache/Solr/Service.php b/Lib/SolrPhpClient/Apache/Solr/Service.php index 07172ab6..f5d7b23a 100644 --- a/Lib/SolrPhpClient/Apache/Solr/Service.php +++ b/Lib/SolrPhpClient/Apache/Solr/Service.php @@ -1255,7 +1255,12 @@ public function search($query, $offset = 0, $limit = 10, $params = array(), $met public function getSynonyms() { $response = $this->_sendRawGet($this->_synonymsUrl); - return get_object_vars(json_decode($response->getRawResponse())->synonymMappings->managedMap); + $responseRaw = $response->getRawResponse(); + if(empty($responseRaw)) { + return array(); + } + + return get_object_vars(json_decode($responseRaw)->synonymMappings->managedMap); } /**