[PATCH] bug in parsing config file section names

From: Date: Thu, 12 Jun 2003 15:30:38 +0000
Subject: [PATCH] bug in parsing config file section names
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9711@lists.php.net to get a copy of this message
the manual: "Section names can be arbitrary strings not containing [ or ] symbols." the patch: attached -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html

Index: libs/Config_File.class.php =================================================================== RCS file: /repository/smarty/libs/Config_File.class.php,v retrieving revision 1.49 diff -u -u -r1.49 Config_File.class.php --- libs/Config_File.class.php 6 Jun 2003 13:52:21 -0000 1.49 +++ libs/Config_File.class.php 12 Jun 2003 15:28:58 -0000 @@ -271,7 +271,7 @@ foreach ($match[1] as $section) { if ($section{0} == '.' && !$this->read_hidden) continue; - if (preg_match("/\[".preg_quote($section)."\](.*?)(\n\[|\Z)/s", $contents, $match)) + if (preg_match("/\[".preg_quote($section, '/')."\](.*?)(\n\[|\Z)/s", $contents, $match)) if ($section{0} == '.') $section = substr($section, 1); $config_data["sections"][$section]["vars"] = $this->_parse_config_block($match[1]);
« previous php.smarty.general (#9711) next »