From 99df8789dca6bb6c5cc30b19259526f3d76741f4 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 10 Apr 2020 13:38:07 +1200 Subject: [PATCH] [NFC] Fix use of pattern-hated-by-Coleman Since I tried to use this as an example of a 'tidy' hook call I'd better fix it --- CRM/Core/BAO/Phone.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);