fix PHP Notice A non well formed numeric value encountered during install

This commit is contained in:
Ralf Becker 2017-11-07 09:51:34 +01:00
parent 590b23b2a8
commit 6152fc4633

View File

@ -790,12 +790,13 @@ function check_fix_php_apc_ini()
/** /**
* Convert a size with unit eg. 32M to a number * Convert a size with unit eg. 32M to a number
* @param int $size * @param int|string $_size
* @return int * @return int
*/ */
function _size_with_unit($size) function _size_with_unit($_size)
{ {
switch(strtoupper(substr($size, -1))) $size = (int)$_size;
switch(strtoupper(substr($_size, -1)))
{ {
case 'G': case 'G':
$size *= 1024; $size *= 1024;