mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10931] Apply strtolower() correctly, i.e. not on false.
PHPBB3-10931
This commit is contained in:
parent
72212077eb
commit
4468847107
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue