CRM_Core_BAO_UFGroup - Fix warning with unknown provider
authorTim Otten <totten@civicrm.org>
Thu, 21 Nov 2013 06:14:03 +0000 (11:44 +0530)
committerTim Otten <totten@civicrm.org>
Thu, 21 Nov 2013 06:14:03 +0000 (11:44 +0530)
CRM/Core/BAO/UFGroup.php

index 2f997be1d3299e0aee7f707185ff2505b253679a..8c13067f58118148a7fff1d124ba3358c0ded707 100644 (file)
@@ -1178,9 +1178,8 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
           }
           elseif ($fieldName == 'im') {
             $providerId = $detailName . '-provider_id';
-            $providerName = $imProviders[$details->$providerId];
-            if ($providerName) {
-              $values[$index] = $details->$detailName . " (" . $providerName . ")";
+            if (isset($imProviders[$details->$providerId])) {
+              $values[$index] = $details->$detailName . " (" . $imProviders[$details->$providerId] . ")";
             }
             else {
               $values[$index] = $details->$detailName;