mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-08 22:40:37 +00:00
If the available disk space exceeds the `PHP_INT_MAX` value, i.e. a 32-bit PHP version is in use with more than 2 GB free, the type casting to `(int)` could cause an overflow, and the Site Health test would then erroneously report that there is not enough free space. This commit removes the unnecessary type casting and uses the result from `disk_free_space()` directly. Includes optimizing the logic to skip further checks if the available disk space could not be determined. Follow-up to [55720]. Props mathsgrinds, Presskopp, rajinsharwar, SergeyBiryukov. Fixes #59116. Built from https://develop.svn.wordpress.org/trunk@56401 git-svn-id: http://core.svn.wordpress.org/trunk@55913 1a063a9b-81f0-0310-95a4-ce76da25c4cd