Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-449

crm_update_contact() causes PHP error if no phone object to exist for the contact

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      If the contact is not created with a phone field, it cannot be updated.

      crm_update_contact() tries to update a non-existant phone record, leading to a PHP error.

      I think is issue is in utils::_crm_update_contact() - there should be checks that $contact->location[$contactLocationBlock]->X is an object when calling _crm_update_object()

      I'd guess similar problems will happen if the contact has no associated im, email or postal_code/address object - not confirmed though

        Attachments

          Activity

            People

            • Assignee:
              anil Anil Kokitkar
              Reporter:
              krabi Peter Cruickshank
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: