fix 'undefined index' bugs
This commit is contained in:
parent
b7fc25291e
commit
215bcc2c77
2 changed files with 4 additions and 2 deletions
|
@ -135,7 +135,9 @@ abstract class CRM_TwingleCampaign_BAO_Campaign {
|
|||
|
||||
// Transfer all embed_data values
|
||||
foreach ($embed_data_keys as $key) {
|
||||
$this->values[$key] = $embedData[$key];
|
||||
if (array_key_exists($key, $embedData)) {
|
||||
$this->values[$key] = $embedData[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ function _updateProjectLocally(array $project_from_twingle,
|
|||
$twingleApi->getProjectEmbedData($project->getProjectId())
|
||||
);
|
||||
// If this is a test, do not make db changes
|
||||
if ($params['is_test']) {
|
||||
if (array_key_exists('is_test', $params) && $params['is_test']) {
|
||||
return civicrm_api3_create_success(
|
||||
$project->getResponse('TwingleProject ready to update'),
|
||||
$params,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue