* @throws CRM_Core_Exception
*/
public static function &singleton($providerParams = array(), $force = FALSE) {
- $mailingID = CRM_Utils_Array::value('mailing_id', $providerParams);
- $providerID = CRM_Utils_Array::value('provider_id', $providerParams);
- $providerName = CRM_Utils_Array::value('provider', $providerParams);
+ $mailingID = $providerParams['mailing_id'] ?? NULL;
+ $providerID = $providerParams['provider_id'] ?? NULL;
+ $providerName = $providerParams['provider'] ?? NULL;
if (!$providerID && $mailingID) {
$providerID = CRM_Core_DAO::getFieldValue('CRM_Mailing_DAO_Mailing', $mailingID, 'sms_provider_id', 'id');
}
if (!$sourceContactID) {
- $sourceContactID = CRM_Utils_Array::value('Contact', $headers);
+ $sourceContactID = $headers['Contact'] ?? NULL;
}
if (!$sourceContactID) {
return FALSE;