mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
fix: cut bytestring into numeric part
This commit is contained in:
@@ -116,20 +116,19 @@ function setMinMemoryLimit($memDestSize) {
|
||||
}
|
||||
|
||||
function getBytes($val) {
|
||||
if (is_numeric($val)) {
|
||||
$val = trim($val);
|
||||
$numeric = substr($val, 0, strlen($val) -1);
|
||||
$last = strtolower($val[strlen($val) - 1]);
|
||||
switch($last) {
|
||||
// The 'G' modifier is available since PHP 5.1.0
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
$numeric *= 1024;
|
||||
case 'm':
|
||||
$val *= 1024;
|
||||
$numeric *= 1024;
|
||||
case 'k':
|
||||
$val *= 1024;
|
||||
}
|
||||
return $val;
|
||||
$numeric *= 1024;
|
||||
}
|
||||
return $numeric;
|
||||
}
|
||||
|
||||
function encrypt($str, $key){
|
||||
|
||||
Reference in New Issue
Block a user