Skip to content

Commit

Permalink
Merge pull request #499 from openeuropa/GH-498
Browse files Browse the repository at this point in the history
GH-498 - Fixing ConfigContext backup strategy.
  • Loading branch information
jhedstrom authored Oct 17, 2018
2 parents 2d98cc6 + 245fec6 commit 3e2cfb9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Drupal/DrupalExtension/Context/ConfigContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ public function setConfig($name, $key, $value)
{
$backup = $this->getDriver()->configGet($name, $key);
$this->getDriver()->configSet($name, $key, $value);
$this->config[$name][$key] = $backup;
if (!array_key_exists($name, $this->config)) {
$this->config[$name][$key] = $backup;
return;
}

if (!array_key_exists($key, $this->config[$name])) {
$this->config[$name][$key] = $backup;
}
}
}

0 comments on commit 3e2cfb9

Please sign in to comment.