Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Config / Config.php
index 7299d5e642cdc5afe6a0cf8df90b81886ccd44d5..f7e0ede695d15db0ff0c1252653e6f93a78a4bca 100644 (file)
@@ -219,6 +219,10 @@ class Config extends StorableConfigBase {
       }
     }
 
+    // Potentially configuration schema could have changed the underlying data's
+    // types.
+    $this->resetOverriddenData();
+
     $this->storage->write($this->name, $this->data);
     if (!$this->isNew) {
       Cache::invalidateTags($this->getCacheTags());
@@ -226,9 +230,6 @@ class Config extends StorableConfigBase {
     $this->isNew = FALSE;
     $this->eventDispatcher->dispatch(ConfigEvents::SAVE, new ConfigCrudEvent($this));
     $this->originalData = $this->data;
-    // Potentially configuration schema could have changed the underlying data's
-    // types.
-    $this->resetOverriddenData();
     return $this;
   }