Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: 4.3.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
When accessing a create contacttype form the api. I get a notice for undefined variables.
To be precise it get's stuck on the next piece of code.
Rules 605-615 from CRM/Contact/BAO/ContactType
if ($contactType->find(TRUE))
{ $contactName = $contactType->name; $contact = ucfirst($contactType->label); $active = $contactType->is_active; } if (CRM_Utils_Array::value('id', $params)) {
$params = array('name' => "New $contactName");
$newParams = array(
'label' => "New $contact",
'is_active' => $active,
);
When the result of $contactType->find(TRUE) is false, the variables $contactName, $contact and $active are never set. Which results in the undefined.