Skip to content
This repository was archived by the owner on May 4, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Lib/SolrPhpClient/Apache/Solr/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down