diff --git a/NEWS b/NEWS index 03d726a3..4edf4f38 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - fix bug where config file starts with hidden section (boots, Monte) - add discrete error checking pertaining to $cache_dir and $compile_dir, their existance and writability (Monte) - fixed behaviour of start=... for {counter} (messju) diff --git a/libs/Config_File.class.php b/libs/Config_File.class.php index f6ee755a..aaadf912 100644 --- a/libs/Config_File.class.php +++ b/libs/Config_File.class.php @@ -262,7 +262,7 @@ class Config_File { $config_data = array(); /* Get global variables first. */ - if (preg_match("/^(.*?)(\n\[|\Z)/s", $contents, $match)) + if ($contents{0} != '[' && preg_match("/^(.*?)(\n\[|\Z)/s", $contents, $match)) $config_data["vars"] = $this->_parse_config_block($match[1]); /* Get section variables. */