Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.5
-
Fix Version/s: 4.4.0
-
Component/s: CiviCRM API
-
Labels:None
Description
I get a php warning when importing contacts.
It's due to line 501 of civicrm/api/v3/Contact.php.
This is the original code:
$customValue = $params['contact_id'] ? CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
$params['contact_id'],
"{$key}{$greeting}_custom"
) : FALSE;
adding an isset() removes the php warning:
$customValue = isset($params['contact_id']) ? CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
$params['contact_id'],
"{$key}{$greeting}_custom"
) : FALSE;