diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php index 184d58d..a849616 100644 --- a/core/lib/Drupal/Core/Config/ConfigFactory.php +++ b/core/lib/Drupal/Core/Config/ConfigFactory.php @@ -160,9 +160,14 @@ protected function doLoadMultiple(array $names, $immutable = TRUE) { foreach ($names as $key => $name) { $cache_key = $this->getConfigCacheKey($name, $immutable); - if (isset($this->cache[$cache_key]) && !$this->cache[$cache_key]->isNew()) { - $list[$name] = $this->cache[$cache_key]; + if (isset($this->cache[$cache_key])) { + // If the config objects exist in the cache, always unset it, but only + // use it if it is not new. We don't need to try and load a config + // object that we know doesn't exist. unset($names[$key]); + if (!$this->cache[$cache_key]->isNew()) { + $list[$name] = $this->cache[$cache_key]; + } } }