Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.7
-
Fix Version/s: 4.7.9
-
Component/s: CiviCRM Search
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
This defect is reproducible on the 4.7 Drupal7 demo site.
- With Search Builder, search for 'Individual > Deceased Date > Is Empty
- CiviCRM crashes with a database error
The database error is a syntax exception. MySQL complains about the clause 'contact_a.deceased_date IS EMPTY'.
Reviewing the code for CRM_Contact_BAO_Query I see that IS EMPTY needs to be translated into 'IS NULL' or "equals the empty string".
The code for CRM_Contact_BAO_Query::dateQueryBuilder() doesn't do this.
PR incoming.