From b43b0d359d87799f060e64ce4b8d506f78d2d843 Mon Sep 17 00:00:00 2001 From: Yuriy Pikhtarev Date: Fri, 5 May 2017 00:59:39 +0300 Subject: [PATCH] Power operator can be used. --- library/ajax/edit_user_profile.php | 2 +- library/attach_mod/includes/functions_attach.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ajax/edit_user_profile.php b/library/ajax/edit_user_profile.php index 6f78ead49..120308c55 100644 --- a/library/ajax/edit_user_profile.php +++ b/library/ajax/edit_user_profile.php @@ -146,7 +146,7 @@ switch ($field) { foreach (array('KB' => 1, 'MB' => 2, 'GB' => 3, 'TB' => 4) as $s => $m) { if (strpos($this->request['value'], $s) !== false) { - $value *= pow(1024, $m); + $value *= 1024 ** $m; break; } } diff --git a/library/attach_mod/includes/functions_attach.php b/library/attach_mod/includes/functions_attach.php index f9fc3fbbc..d129fb874 100644 --- a/library/attach_mod/includes/functions_attach.php +++ b/library/attach_mod/includes/functions_attach.php @@ -84,7 +84,7 @@ function base64_unpack($string) for ($i = 1; $i <= $length; $i++) { $pos = $length - $i; $operand = strpos($chars, substr($string, $pos, 1)); - $exponent = pow($base, $i - 1); + $exponent = $base ** ($i - 1); $decValue = $operand * $exponent; $number += $decValue; }