* @param null $reset
*
* @return null|CRM_Core_BAO_WordReplacement
+ * @throws CRM_Core_Exception
*/
public static function getWordReplacement($reset = NULL) {
static $wordReplacement = NULL;
$wordReplacement = new CRM_Core_BAO_WordReplacement();
$wordReplacement->id = CRM_Core_Config::wordReplacementID();
if (!$wordReplacement->find(TRUE)) {
- CRM_Core_Error::fatal();
+ throw new CRM_Core_Exception('Unable to find word replacement');
}
}
return $wordReplacement;
$localCustomData = $localeCustomArray[$lang];
// Traverse status array "enabled" "disabled"
foreach ($localCustomData as $status => $matchTypes) {
- $params["is_active"] = ($status == "enabled") ? TRUE : FALSE;
+ $params["is_active"] = $status == "enabled";
// Traverse Match Type array "wildcardMatch" "exactMatch"
foreach ($matchTypes as $matchType => $words) {
$params["match_type"] = $matchType;