When only one double qoute is used in the search terms the value of $ret['#conjuction'] is added to $str and unset, causing "Notice: Undefined index: #conjunction in SearchApiDbService->prepareKeys() (line 705 of...".

To reproduce using the db server use a multiple terms query and search terms like: "some terms here with no closing quote mark. Looks like element_children() may help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey’s picture

Status: Active » Needs review
FileSize
991 bytes

Ah, thanks for spotting this!
The code was a bit off – don't see what we gain by adding the conjunction right away, apart from problems. The attached patch should fix this.

awolfey’s picture

Status: Needs review » Reviewed & tested by the community

Works for me.

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Great, committed!

Status: Fixed » Closed (fixed)

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