mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/10931] Apply strtolower() correctly, i.e. not on false.
PHPBB3-10931
This commit is contained in:
@@ -67,9 +67,9 @@ class phpbb_php_ini
|
|||||||
*/
|
*/
|
||||||
public function get_bool($varname)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ class phpbb_php_ini
|
|||||||
*/
|
*/
|
||||||
public function get_bytes($varname)
|
public function get_bytes($varname)
|
||||||
{
|
{
|
||||||
$value = strtolower($this->get_string($varname));
|
$value = $this->get_string($varname);
|
||||||
|
|
||||||
if ($value === false)
|
if ($value === false)
|
||||||
{
|
{
|
||||||
@@ -151,9 +151,10 @@ class phpbb_php_ini
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$value_lower = strtolower($value);
|
||||||
$value_numeric = phpbb_to_numeric($value);
|
$value_numeric = phpbb_to_numeric($value);
|
||||||
|
|
||||||
switch ($value[strlen($value) - 1])
|
switch ($value_lower[strlen($value_lower) - 1])
|
||||||
{
|
{
|
||||||
case 'g':
|
case 'g':
|
||||||
$value_numeric *= 1024;
|
$value_numeric *= 1024;
|
||||||
|
Reference in New Issue
Block a user