aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/php/ini.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/php/ini.php')
-rw-r--r--phpBB/includes/php/ini.php17
1 files changed, 2 insertions, 15 deletions
diff --git a/phpBB/includes/php/ini.php b/phpBB/includes/php/ini.php
index bbe592a7df..02c2b7ccc6 100644
--- a/phpBB/includes/php/ini.php
+++ b/phpBB/includes/php/ini.php
@@ -138,7 +138,7 @@ class phpbb_php_ini
if (is_numeric($value))
{
// Already in bytes.
- return $this->to_numeric($value);
+ return phpbb_to_numeric($value);
}
else if (strlen($value) < 2)
{
@@ -151,7 +151,7 @@ class phpbb_php_ini
return false;
}
- $value_numeric = $this->to_numeric($value);
+ $value_numeric = phpbb_to_numeric($value);
switch ($value[strlen($value) - 1])
{
@@ -171,17 +171,4 @@ class phpbb_php_ini
return $value_numeric;
}
-
- /**
- * Casts a numeric string $input to an appropriate numeric type (i.e. integer or float)
- *
- * @param string $input A numeric string.
- *
- * @return int|float Integer $input if $input fits integer,
- * float $input otherwise.
- */
- protected function to_numeric($input)
- {
- return ($input > PHP_INT_MAX) ? (float) $input : (int) $input;
- }
}