WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #50913, comment 34


Ignore:
Timestamp:
09/18/2020 10:07:20 PM (11 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50913, comment 34

    initial v1  
    88> In particular, checking if an empty string is less than zero in PHP 8 evaluates to `true`, not `false`.
    99
    10 Just noting that I checked other instances of `< 0` in core to see if any of them involve an empty string, but it doesn't look like they are affected. Most of them already explicitly cast the left part to `(int)`, and the rest are unlikely to contain a string either. If someone would like to double-check that, please do :)
     10Just noting that I checked other instances of `... < 0` in core to see if any of them involve an empty string, but it doesn't look like they are affected. Most of them already explicitly cast the left part to `(int)`, and the rest are unlikely to contain a string either. If someone would like to double-check that, please do :)