When spellcheck.extendedResults is enabled SOLR 4.x returns a boolean called CorrectlySpelled in the suggestions, This causes an error when looping through the results. Rather than the user have to handle this in a solr suggestions alter hook and unset it at the end, and as we are already checking to see if $value->suggestion is an object we should also check that $value is an object.

Comments

paulmartin84 created an issue. See original summary.

paulmartin84’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB

Patched Attached

SpherrY’s picture

I seem to have not only the correctlySpelled boolean, but also another object called "collation", which does not have a "suggestion" property. So I needed to handle that one too. Do you happen to know where this object comes from? I'm new to Drupal, so I can't find everything yet!