Search Suggestion drop down warnings
-
Everything appears to be working except the drop down suggestion box when a user is typing in a string to search for. In the drop down menu instead of getting suggestions I get the following:
“Warning: get_object_vars() expects parameter 1 to be object, null given in /var/www/wp/wp-content/plugins/advanced-search-by-my-solr-server/advanced-search-by-my-solr-server.inc.php on line 419”
followed by
“Warning: Invalid argument supplied for foreach() in…” line 420
here is the code where it is borking for me:
$response = $solr->search($q, 0, $limit, $params);
if ( ! $response->getHttpStatus() == 200 ) {
return;
}$terms = get_object_vars($response->terms->spell);
foreach($terms as $term => $count) {
printf(“%s\n”, $term);
}the “$response->terms->spell” is returning null and I can’t figure out why. I am getting result after i press enter so i am confident solr is working.
any thought would be greatly appreciated.
Thanks
https://www.ads-software.com/extend/plugins/advanced-search-by-my-solr-server/
- The topic ‘Search Suggestion drop down warnings’ is closed to new replies.