mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
Booleanize case-insensitively.
This commit is contained in:
@@ -286,9 +286,9 @@ class Config_File extends PEAR {
|
||||
return new Config_File_Error("Bad variable name '$var_name'");
|
||||
|
||||
if ($booleanize) {
|
||||
if (preg_match("/^(on|true|yes)$/", $var_value))
|
||||
if (preg_match("/^(on|true|yes)$/i", $var_value))
|
||||
$var_value = true;
|
||||
else if (preg_match("/^(off|false|no)$/", $var_value))
|
||||
else if (preg_match("/^(off|false|no)$/i", $var_value))
|
||||
$var_value = false;
|
||||
}
|
||||
|
||||
|
@@ -286,9 +286,9 @@ class Config_File extends PEAR {
|
||||
return new Config_File_Error("Bad variable name '$var_name'");
|
||||
|
||||
if ($booleanize) {
|
||||
if (preg_match("/^(on|true|yes)$/", $var_value))
|
||||
if (preg_match("/^(on|true|yes)$/i", $var_value))
|
||||
$var_value = true;
|
||||
else if (preg_match("/^(off|false|no)$/", $var_value))
|
||||
else if (preg_match("/^(off|false|no)$/i", $var_value))
|
||||
$var_value = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user