X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FMapping.php;h=56c1d9e02034591b8e1c82a6404eab339f88058c;hb=ab1d98dd07ec04f49b67a93e20ec9a6f8f347d9a;hp=19c6ec2290cd8cff27b851cdc0386c2522be4a1d;hpb=2e5067e6f8379e0a7fcfe41d51396776a4a04bf9;p=civicrm-core.git diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 19c6ec2290..56c1d9e020 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -1002,6 +1002,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { * * @return array * formatted associated array of elements + * @throws CRM_Core_Exception */ public static function formattedFields(&$params, $row = FALSE) { $fields = []; @@ -1016,7 +1017,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { foreach ($value as $k => $v) { if (in_array($v[0], $types)) { if ($contactType && $contactType != $v[0]) { - CRM_Core_Error::fatal(ts("Cannot have two clauses with different types: %1, %2", + throw new CRM_Core_Exception(ts("Cannot have two clauses with different types: %1, %2", [1 => $contactType, 2 => $v[0]] )); }