Not certain this is a bug here, but fixing these values in the setter does work.

The database is treating the flag for email address defaults (redhen_contact_email_default column) by handing back 1's and 0's. The setter is using True and False.

In redhen_donation we are calling $contact_wrapper->email->set() using a value retrieved from $contact_wrapper->email->get(), but if the contact has multiple email addresses, this causes a database exception to be thrown for a non-integer value in the 'default' column.

Using 0 and 1 in contact_property_email_set, as in the attached patch, resolves the issue.

CommentFileSizeAuthor
default_flag_invalid_for_database.patch916 bytesgcb

Comments

levelos’s picture

Status: Needs review » Fixed

  • levelos committed 7c5c0a4 on 7.x-1.x authored by gcb
    Issue #2349253 by gcb: contact_property_email_set causes crash using...

Status: Fixed » Closed (fixed)

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