Fix for Undefined index: 1151 in CRM_Core_Config_Variables->countryLimit()
authorSadashiv Dalvi <dalvisadashiv@gmail.com>
Tue, 12 Nov 2013 11:18:56 +0000 (16:48 +0530)
committerSadashiv Dalvi <dalvisadashiv@gmail.com>
Tue, 12 Nov 2013 11:18:56 +0000 (16:48 +0530)
CRM/Core/Config/Variables.php

index d295c1a872f7b4c855990a4885ee5c9c7e6b279a..71bd356b51bdf6e3a58341061828392fb04d957a 100644 (file)
@@ -585,7 +585,12 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults {
       $country = array();
       if (is_array($this->provinceLimit)) {
         foreach ($this->provinceLimit as $val) {
-          $country[] = $countryIsoCodes[$val];
+          // CRM-12007
+          // some countries have disappeared and hence they might be in country limit
+          // but not in the country table
+          if (isset($countryIsoCodes[$val])) {
+            $country[] = $countryIsoCodes[$val];
+          }
         }
       }
       else {