Skip to content
Snippets Groups Projects
Commit eca1f70e authored by Demian Katz's avatar Demian Katz
Browse files

Avoid error caused by unset $results.

parent ffa95b58
Branches
Tags
No related merge requests found
......@@ -207,7 +207,7 @@ class Solr implements AutocompleteInterface
} catch (\Exception $e) {
// Ignore errors -- just return empty results if we must.
}
return array_unique($results);
return isset($results) ? array_unique($results) : [];
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment