Merge pull request #16837 from tunbola/case-api-case-clients
[civicrm-core.git] / CRM / Core / BAO / WordReplacement.php
index 0a80ecac99ffc79818f6488007603d23f1282f39..d8fe9df6b359fa05c4dcaa8629eaae7d5a35f058 100644 (file)
@@ -223,7 +223,7 @@ WHERE  domain_id = %1
         $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,
@@ -232,7 +232,7 @@ WHERE  domain_id = %1
           $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;
@@ -299,7 +299,7 @@ WHERE  domain_id = %1
       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);
     }
   }