We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I was unable to complete upload of an image when using sonata-admin on php7.1 . Problem i found was
Notice: A non well formed numeric value encountered in vendor/comur/image-bundle/Comur/ImageBundle/Handler/UploadHandler.php at line 344
i fixed it by adding a line $val = substr($val, 0, -1);
inside this function ` function get_config_bytes($val) { $val = trim($val); $last = strtolower($val[strlen($val)-1]); $val = substr($val, 0, -1); switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $this->fix_integer_overflow($val); } `
inside this function ` function get_config_bytes($val) {
$val = trim($val); $last = strtolower($val[strlen($val)-1]); $val = substr($val, 0, -1); switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $this->fix_integer_overflow($val);
} `
and it works fine after this.. BTW i think it should be like 1024*1024 in case of Mb an so on, but nwm..
So maybe it helps someone else.
The text was updated successfully, but these errors were encountered:
I have the same problem, and fixed it the same way..
Sorry, something went wrong.
Hi, Thanks for this workaround, maybe you can create a PR with a retrocompatible code ? Thanks
This is a bug introduced with one of the PR changing:
$val = (int)$val*1024;
to
$val *= 1024;
It's not merged on latest releases so I close it
No branches or pull requests
Hello,
I was unable to complete upload of an image when using sonata-admin on php7.1 . Problem i found was
i fixed it by adding a line
$val = substr($val, 0, -1);
and it works fine after this.. BTW i think it should be like 1024*1024 in case of Mb an so on, but nwm..
So maybe it helps someone else.
The text was updated successfully, but these errors were encountered: