From: Frank J. Gómez Date: Wed, 16 Jul 2014 21:57:49 +0000 (-0400) Subject: CRM-14990. Update strictness of param comparison for consistency with the rest of... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1155dd581bcbcadff3075b4d987e2f1b4f3cab18;p=civicrm-core.git CRM-14990. Update strictness of param comparison for consistency with the rest of Civi's codebase, per Eileen's recommendation: https://github.com/civicrm/civicrm-core/commit/f329e1deb8ebc36b68b3fe4448b16fc6f5cf52bd#commitcomment-7036984. --- diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index 1bf03e1988..060dd7dd1f 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -161,12 +161,7 @@ class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup { } if (array_key_exists('is_reserved', $params)) { - if (in_array($params['is_reserved'], array(TRUE, 1, '1'), TRUE)) { - $is_reserved = 1; - } else { - $is_reserved = 0; - } - $group->is_reserved = $is_reserved; + $group->is_reserved = $params['is_reserved'] ? 1 : 0; } $op = isset($params['id']) ? 'edit' : 'create'; CRM_Utils_Hook::pre($op, 'CustomGroup', CRM_Utils_Array::value('id', $params), $params);