fix bug where config file starts with hidden section

This commit is contained in:
mohrt
2003-06-06 13:52:21 +00:00
parent 311a83f14a
commit e51af36e66
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@@ -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)

View File

@@ -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. */