return sprintf('%s %s "%s"', $fieldAlias, $operator, \CRM_Core_DAO::escapeString($value));
}
+ if (!$value && ($operator === 'IN' || $operator === 'NOT IN')) {
+ $value[] = FALSE;
+ }
+
if (is_bool($value)) {
$value = (int) $value;
}
$this->assertCount(0, $result);
}
+ public function testInvalidPseudoConstantWithIN(): void {
+ $this->createTestRecord('Contact', [
+ 'first_name' => uniqid(),
+ 'last_name' => uniqid(),
+ 'prefix_id:name' => 'Ms.',
+ ]);
+ $resultCount = Contact::get(FALSE)
+ ->addSelect('id')
+ ->addWhere('prefix_id:name', 'IN', ['Msssss.'])
+ ->execute();
+ $this->assertCount(0, $resultCount);
+ }
+
}