The SearchQuery::execute() method currently returns FALSE when the normalization query failed. This makes the rest of the database layer choke when, for example, you try to extend a SearchQuery-extended query by a PagerQuery.

Discussed with Larry on #drupal: the proper solution is to add a DatabaseStatementEmpty class that properly implement DatabaseStatementInterface.

CommentFileSizeAuthor
#2 empty-result.patch5.38 KBCrell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

This makes sense to me. It sounds like it could be a relatively small change acceptable for D7.

Crell’s picture

Assigned: Unassigned » Crell
Status: Active » Needs review
FileSize
5.38 KB

This passes the relevant tests for me. Nice and simple.

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

That looks perfect to me, thanks Larry.

Status: Reviewed & tested by the community » Needs review

Re-test of empty-result.patch from comment #2 was requested by webchick.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Still green. This is DamZ's RTBC, not mine, I'm just verifying the bot. :-)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD, with the addition of a @see SearchQuery, since I would otherwise have no idea what the heck you guys were talking about. ;) This is not really the fault of the description, though, which is accurate.

Status: Fixed » Closed (fixed)

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