$params["domain_id"] = $value["id"];
$params["options"] = ['wp-rebuild' => $rebuildEach];
// Unserialize word match string.
- $localeCustomArray = unserialize($value["locale_custom_strings"]);
+ $localeCustomArray = CRM_Utils_String::unserialize($value["locale_custom_strings"]);
if (!empty($localeCustomArray)) {
$wordMatchArray = [];
// Only return the replacement strings of the current language,
$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;
1 => [$domainId, 'Integer'],
]);
while ($domain->fetch()) {
- return empty($domain->locale_custom_strings) ? [] : unserialize($domain->locale_custom_strings);
+ return empty($domain->locale_custom_strings) ? [] : CRM_Utils_String::unserialize($domain->locale_custom_strings);
}
}