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

crm_get_contact() returns junk instead of error

    Details

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

      Description

      When I do:
      $CRM = crm_get_contact(array('email'=>'foo@bar.com'));
      when there is no entry in the CRM DB with email foo@bar.com, a CRM_Core_Error should be returned (or at least, one used to be returned).

      Now, I'm getting a partially completed CRM Contact object, with the email field not set. I'm having to check field values before I can tell whether the get was succesful or not.

      I first noticed this behaviour with Rev 3592, but it's also like this in the latest beta, Rev 3610.

      Running

      PHP4.3.10, MySql 4.1.11

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              krabi Peter Cruickshank
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: