Read legacy "inherit_index" value correctly

This commit is contained in:
Stéphane Goetz 2016-08-04 22:10:36 +02:00
parent 647c0beb3b
commit 67c5fa2f7e
1 changed files with 4 additions and 5 deletions

View File

@ -90,14 +90,13 @@ class Config extends ArrayObject
public function shouldInheritIndex() public function shouldInheritIndex()
{ {
if (array_key_exists('html', $this) && array_key_exists('inherit_index', $this['html'])) { // As the global configuration is always present, we
return $this['html']['inherit_index']; // need to test for the existence of the legacy value
} // first. Then use the current value.
if (array_key_exists('live', $this) && array_key_exists('inherit_index', $this['live'])) { if (array_key_exists('live', $this) && array_key_exists('inherit_index', $this['live'])) {
return $this['live']['inherit_index']; return $this['live']['inherit_index'];
} }
return false; return $this['html']['inherit_index'];
} }
} }