From 82eff07bafa1f39806f41e80817f4679c73984f7 Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Tue, 18 Apr 2017 13:13:36 -0400 Subject: [PATCH] CRM-20381 - ensure option to NOT geocode on imports is respected. --- CRM/Core/Config/MagicMerge.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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': -- 2.25.1