aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-06-11 15:45:30 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-06-11 15:46:03 +0200
commit4468847107103c44936468e6e3c1badeb333ff52 (patch)
tree0eb2158c64ce42365c9e5a4b9f0826c408553458 /phpBB/includes/php
parent72212077ebecee639c49c473646a38340908d058 (diff)
downloadforums-4468847107103c44936468e6e3c1badeb333ff52.tar
forums-4468847107103c44936468e6e3c1badeb333ff52.tar.gz
forums-4468847107103c44936468e6e3c1badeb333ff52.tar.bz2
forums-4468847107103c44936468e6e3c1badeb333ff52.tar.xz
forums-4468847107103c44936468e6e3c1badeb333ff52.zip
[ticket/10931] Apply strtolower() correctly, i.e. not on false.
PHPBB3-10931
Diffstat (limited to 'phpBB/includes/php')
-rw-r--r--phpBB/includes/php/ini.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/php/ini.php b/phpBB/includes/php/ini.php
index 02c2b7ccc6..17e8c54a57 100644
--- a/phpBB/includes/php/ini.php
+++ b/phpBB/includes/php/ini.php
@@ -67,9 +67,9 @@ class phpbb_php_ini
*/
public function get_bool($varname)
{
- $value = strtolower($this->get_string($varname));
+ $value = $this->get_string($varname);
- if (empty($value) || $value == 'off')
+ if (empty($value) || strtolower($value) == 'off')
{
return false;
}
@@ -128,7 +128,7 @@ class phpbb_php_ini
*/
public function get_bytes($varname)
{
- $value = strtolower($this->get_string($varname));
+ $value = $this->get_string($varname);
if ($value === false)
{
@@ -151,9 +151,10 @@ class phpbb_php_ini
return false;
}
+ $value_lower = strtolower($value);
$value_numeric = phpbb_to_numeric($value);
- switch ($value[strlen($value) - 1])
+ switch ($value_lower[strlen($value_lower) - 1])
{
case 'g':
$value_numeric *= 1024;