You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ignoring non-integer and negative values of $bytes there are two cases: $bytes == 0 and $bytes >= 1.
In case of $bytes >= 1: Everything is fine, the script runs fine the result is as expected.
In case of $bytes == 0: Things were slightly broken, if one ignored warnings, the result is "0 B", so as expected, however: In PHP 8.0 a division by zero is not a Warning anymore, but a Fatal error.
$log(0) = -\infty$, so $1024^{-\infty} = 0$
This is fixable by inserting something like if ($bytes < 1) { return "0 B"; } just before the first line.
The text was updated successfully, but these errors were encountered:
warpdrive/src/class-database-size-plugin.php
Lines 128 to 134 in 8c72987
Ignoring non-integer and negative values of
$bytes
there are two cases:$bytes
== 0 and$bytes
>= 1.In case of
$bytes
>= 1: Everything is fine, the script runs fine the result is as expected.In case of
$bytes
== 0: Things were slightly broken, if one ignored warnings, the result is "0 B", so as expected, however: In PHP 8.0 a division by zero is not a Warning anymore, but a Fatal error.This is fixable by inserting something like
if ($bytes < 1) { return "0 B"; }
just before the first line.The text was updated successfully, but these errors were encountered: