Page 1 of 1

Bug(AndFix)Report: 'Unsupported operand types: string / int'

Posted: 11 Jan 2023, 10:43
by HueNa
Hello,

After I updated the PHP from Version 7.4.33 to Version 8.0.25,
I come to get 'Unsupported operand types: string / int' error when I select a file from backend.

I'm using Joomla! 3.10.11 and PhocaDownload Version 3.2.3.

The Error is raised at /administrator/components/com_phocadownload/libraries/phocadownload/file/file.php:32.
I could fix the error by replacing the line,
from

Code: Select all

if ($sizestring != $lastsizestring) { $size /= 1024; }
to

Code: Select all

if ($sizestring != $lastsizestring) { $size = intval($size) / 1024; }
If this fix is adequate, please adopt it to the next version.

Re: Bug(AndFix)Report: 'Unsupported operand types: string / int'

Posted: 11 Jan 2023, 21:41
by Jan
Hi, thank you for the info, yes, there can be int instead of intval.

I will set it in next version.

Thank you, Jan