henryjanssen
Forum Replies Created
-
Maybe worthwhile to mention is that this issue only occurs on 32 bit systems. On 64 bit systems the MAX int limit is much higher:
An integer data type is a non-decimal number between -2147483648 and 2147483647 in 32 bit systems, and between -9223372036854775808 and 9223372036854775807 in 64 bit systems. A value greater (or lower) than this, will be stored as float, because it exceeds the limit of an integer.As a test I removed the cast to int, I changed
$available_space = false !== $available_space? (int) $available_space: 0;
into
$available_space = false !== $available_space? $available_space: 0;
I now get in the passed tests:
40 GB available disk space was detected, update routines can be performed safely.
I don’t know whether developers are reading this forum and how to make them aware of the error.@mathgrinds. I have the same problem with my installation on a pi3. The error is indeed in the function you mentioned.
WP_Site_Health::get_test_available_updates_disk_space() | Method | WordPress Developer Resources
On line 1946
$available_space = false !== $available_space
? (int) $available_space
: 0;The cast (int) $available_space causes the issue, the issue is caused if you have to much free space. Then this cast returns a negative number. In my case:
$available_space => 42632790016
(int) $available_space => -316882944I am not a php expert but repairing this error should be trivial to one of the developers