When I installed the newer release with the latest Apachesolr 7.x-1.8 it throws hundreds per search of this php warning:

Warning: in_array() expects parameter 2 to be array, null given in apachesolr_autocomplete_suggest() (line 508 of ~/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module).

This was caused by a missing initialization of variable $words in apachesolr_autocomplete_get_stopwords().

CommentFileSizeAuthor
#2 apachesolr_autocomplete_2628364.patch433 bytesa.sopko
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

derek_slis created an issue. See original summary.

a.sopko’s picture

it's because you don't have any stopwords in your solr configuration,
here patch

DamienMcKenna’s picture

Status: Active » Needs review

Please don't forget to set the issue status to "needs review" when you upload a patch :)

DamienMcKenna’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

This is a very simple patch that solves the problem.

blauerberg’s picture

#2 works for me, thanks.

parasolx’s picture

#2 also solve the problem for me.

  • a.sopko authored c958c14 on 7.x-1.x
    Issue #2628364 by a.sopko: php warning
    
janusman’s picture

Status: Reviewed & tested by the community » Fixed

Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

donquixote’s picture

Title: php warning » Warning: in_array() expects parameter 2 to be array, null given in apachesolr_autocomplete_suggest()
Issue summary: View changes

Mention apachesolr_autocomplete_get_stopwords() in the issue summary for better findabilty.
Change issue title for better findability.

donquixote’s picture

Issue summary: View changes
donquixote’s picture

@janusman: Are you planning to release this fix in a tagged version?

donquixote’s picture

Oh and thanks for the fix :)