[wp-trac] [WordPress Trac] #59116: Integer Casting Error in WP_Site_Health::get_test_available_updates_disk_space() wordpress

WordPress Trac noreply at wordpress.org
Wed Aug 16 21:20:26 UTC 2023


#59116: Integer Casting Error in
WP_Site_Health::get_test_available_updates_disk_space() wordpress
--------------------------+-----------------------------
 Reporter:  mathsgrinds   |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  6.3.1
Component:  Site Health   |     Version:  6.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch => has-patch


Comment:

 Thanks for the patch!

 I think we can avoid the type casting altogether and optimize the logic a
 bit to reduce the number of checks in certain scenarios, e.g. skip further
 checks if `$available_space` is false. See [attachment:"59116.2.diff"].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59116#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list