Event participant_listing_id field defaults to 0 instead of Null
Overview
When creating a new Event via the API, without specifying participant_listing_id, it defaults to a value of 0. However, 0 is not a valid value. The correct default should be Null. The 0 value results in an error when subsequently accessing the record.
Workaround: call the Event.create API explicitly passing participant_listing_id => null
Current behaviour
Database ends up with a value of 0 when new record is created.
Expected behaviour
Database ends up with a value of NULL when new record is created.
Environment information
- CiviCRM: 5.26.1