From b474404b97149c8dea7f5699104e83e5dde9e49d Mon Sep 17 00:00:00 2001 From: messju Date: Thu, 12 Feb 2004 11:28:50 +0000 Subject: [PATCH] YES and NO should not be booleanized inside triple-quotes in a config-file. this behaviour changed by accident in 2.6.1 and is now reverted to pre-2.6.1 behaviour --- NEWS | 2 ++ libs/Config_File.class.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 719ab4ac..c1b688a4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fix YES and NO should not be booleanized inside triple-quotes in a + config-file (messju) - fix accidently slurped line following a triple-quoted value in a config-file (messju) - change default for use_sub_dirs to false (messju) diff --git a/libs/Config_File.class.php b/libs/Config_File.class.php index 33ecc7dd..3be831f3 100644 --- a/libs/Config_File.class.php +++ b/libs/Config_File.class.php @@ -328,13 +328,15 @@ class Config_File { break; } } + $booleanize = false; } else { /* handle simple value */ $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', rtrim($match[2])); + $booleanize = $this->booleanize; } - $this->_set_config_var($vars, $var_name, $var_value, $this->booleanize); + $this->_set_config_var($vars, $var_name, $var_value, $booleanize); } /* else unparsable line / means it is a comment / means ignore it */ }