Hot answers tagged

2

With API4 you can do it like this: $contacts = \Civi\Api4\Contact::get() ->addClause('OR', ['birth_date', '<=', '1960-01-01'], ['birth_date', 'IS NULL'] ) ->execute(); foreach ($contacts as $contact) { // do something }


1

I believe api4 throws API_Exception and sometimes Exception.


1

I've confirmed this bug and reported at https://lab.civicrm.org/dev/core/issues/1517 PR https://github.com/civicrm/civicrm-core/pull/16266 should fix the problem.


Only top voted, non community-wiki answers of a minimum length are eligible