While the documentation for SearchApiQueryInterface::execute() explicitly states that the returned results always have to have both the 'result count' and 'results' keys set, there is actually a code path in our search() method which results in an empty results array. Even though unlikely to cause any errors (I'd say), we should still fix it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

The attached patch should fix this, and even contains a test.

Status: Needs review » Needs work
drunken monkey’s picture

Status: Needs work » Fixed

Committed.

  • drunken monkey committed 5dabfea on 7.x-1.x
    Issue #2632426 by drunken monkey: Fixed "results" key sometimes missing...

Status: Fixed » Closed (fixed)

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