Pull-request: #15928 Fixes: #15926 Closes: #15932 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
b25b3fbc9f
@ -438,7 +438,7 @@ class Core
|
||||
];
|
||||
|
||||
if (preg_match('/^([0-9]+)([KMGT])/i', $size, $matches)) {
|
||||
return $matches[1] * $binaryprefixes[$matches[2]];
|
||||
return (int) ($matches[1] * $binaryprefixes[$matches[2]]);
|
||||
}
|
||||
|
||||
return (int) $size;
|
||||
|
||||
@ -567,6 +567,14 @@ class CoreTest extends PmaTestCase
|
||||
'1024',
|
||||
1024,
|
||||
],
|
||||
[
|
||||
'8000m',
|
||||
8 * 1000 * 1024 * 1024,
|
||||
],
|
||||
[
|
||||
'8G',
|
||||
8 * 1024 * 1024 * 1024,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user