diff --git a/CRM/Core/BAO/Phone.php b/CRM/Core/BAO/Phone.php index 0a61703b0c2b..bf4dd2c0431f 100644 --- a/CRM/Core/BAO/Phone.php +++ b/CRM/Core/BAO/Phone.php @@ -58,7 +58,7 @@ public static function add(&$params) { CRM_Core_DAO::checkSqlFunctionsExist(); $hook = empty($params['id']) ? 'create' : 'edit'; - CRM_Utils_Hook::pre($hook, 'Phone', CRM_Utils_Array::value('id', $params), $params); + CRM_Utils_Hook::pre($hook, 'Phone', $params['id'] ?? NULL, $params); $phone = new CRM_Core_DAO_Phone(); $phone->copyValues($params);