);
}
}
-
- return $activityTypes[$cacheKey];
+ if (!empty($activityTypes[$cacheKey])) {
+ return $activityTypes[$cacheKey];
+ }
+ else {
+ return;
+ }
}
/**
*
* @return array success message
*/
- public function releaseRespondent($params) {
+ public static function releaseRespondent($params) {
$activityStatus = CRM_Core_PseudoConstant::activityStatus('name');
$reserveStatusId = array_search('Scheduled', $activityStatus);
$surveyActivityTypes = CRM_Campaign_BAO_Survey::getSurveyActivityType();
- $surveyActivityTypesIds = array_keys($surveyActivityTypes);
+ if (!empty($surveyActivityTypes) && is_array($surveyActivityTypes)) {
+ $surveyActivityTypesIds = array_keys($surveyActivityTypes);
+ }
//retrieve all survey activities related to reserve action.
$releasedCount = 0;
*/
static function getComponentID($componentName) {
$info = self::_info();
-
- return $info[$componentName]->componentID;
+ if (!empty($info[$componentName])) {
+ return $info[$componentName]->componentID;
+ }
+ else {
+ return;
+ }
}
/**