From 67c5fa2f7e492f7d8bd5a6d85ce879bfce4a187f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Goetz?= Date: Thu, 4 Aug 2016 22:10:36 +0200 Subject: [PATCH] Read legacy "inherit_index" value correctly --- libs/Config.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/Config.php b/libs/Config.php index f9e60f7..d952ad9 100644 --- a/libs/Config.php +++ b/libs/Config.php @@ -90,14 +90,13 @@ class Config extends ArrayObject public function shouldInheritIndex() { - if (array_key_exists('html', $this) && array_key_exists('inherit_index', $this['html'])) { - return $this['html']['inherit_index']; - } - + // As the global configuration is always present, we + // 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'])) { return $this['live']['inherit_index']; } - return false; + return $this['html']['inherit_index']; } }