WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #44458, comment 21


Ignore:
Timestamp:
07/23/2018 08:37:27 PM (19 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44458, comment 21

    initial v1  
    33* Fix PHP 5.2 warnings in `class-wp-plugins-list-table.php`:
    44 * Before 5.3, core constants used to be in the `internal` group.
    5  * On 5.2 there's less than 15 error constants, so an `array_slice()` of the 15 items includes `TRUE` and `FALSE`, which then causes a warning in `array_flip()`: "Can only flip STRING and INTEGER values". Instead of hardcoding 15 items, the patch builds an array with all core constants starting with `E_`.
     5 * On 5.2 there's less than 15 error constants, so an `array_slice()` of the first 15 items includes `TRUE` and `FALSE`, which then causes a warning in `array_flip()`: "Can only flip STRING and INTEGER values". Instead of hardcoding 15 items, the patch builds an array with all core constants starting with `E_`.