From: Jamie McClelland Date: Tue, 18 Apr 2017 17:13:36 +0000 (-0400) Subject: CRM-20381 - ensure option to NOT geocode on imports is respected. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=82eff07bafa1f39806f41e80817f4679c73984f7;p=civicrm-core.git CRM-20381 - ensure option to NOT geocode on imports is respected. --- diff --git a/CRM/Core/Config/MagicMerge.php b/CRM/Core/Config/MagicMerge.php index 72fe7827ed..0d6b722d21 100644 --- a/CRM/Core/Config/MagicMerge.php +++ b/CRM/Core/Config/MagicMerge.php @@ -222,7 +222,7 @@ class CRM_Core_Config_MagicMerge { if (!isset($this->map[$k])) { throw new \CRM_Core_Exception("Cannot read unrecognized property CRM_Core_Config::\${$k}."); } - if (isset($this->cache[$k])) { + if (array_key_exists($k, $this->cache)) { return $this->cache[$k]; } @@ -309,7 +309,11 @@ class CRM_Core_Config_MagicMerge { } unset($this->cache[$k]); $type = $this->map[$k][0]; - $name = isset($this->map[$k][1]) ? $this->map[$k][1] : $k; + + $name = $k; + // If foreign name is set, use that name (except with callback types because + // their second parameter is the object, not the foreign name). + $name = isset($this->map[$k][1]) && $type != 'callback' ? $this->map[$k][1] : $k; switch ($type) { case 'setting':