WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #45933, comment 35


Ignore:
Timestamp:
01/21/2019 11:15:51 AM (22 months ago)
Author:
schlessera
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #45933, comment 35

    v1 v2  
    44- Doing `empty()` checks on strings means that it is not possible to override a string like `$args['title']` to be an empty string. Just as well, doing `empty()` checks on integers means that it is not possible to override values like `$args['code']` to be `0`. `isset()` or `array_key_exists()` checks would be more explicit and still allow for empty strings and the value `0` as a valid input.
    55- `$args['response']` seems to have both `0` (line 3327) as well as `500` (line 3375) as default values. If it should be `0`, then some of the calls will be wrong, as setting of return code 500 is removed in some places by the patch (line 3024, line 3218, line 3257).
    6 - Code should be an integer but defaults to an empty string (line 3328).
    7 - Text direction could default to `ltr` to simplify the code (line 3332).
     6- `'code'` should be an integer but defaults to an empty string (line 3328).
     7- `'text_direction'` could default to `ltr` to simplify the code (line 3332).
    88
    99