[wp-trac] [WordPress Trac] #50343: [PHP 8] Fix deprecation notices for optional function parameters declared before required parameter.
WordPress Trac
noreply at wordpress.org
Fri Aug 14 14:51:59 UTC 2020
#50343: [PHP 8] Fix deprecation notices for optional function parameters declared
before required parameter.
-------------------------------------------+-------------------------------
Reporter: ayeshrajans | Owner: SergeyBiryukov
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 5.6
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch php8 has-unit-tests | Focuses: coding-standards
-------------------------------------------+-------------------------------
Comment (by jrf):
> I think dropping the default values can have non-zero number of users
who might have ignored the warning, but get an exception in WordPress 5.6.
If they did, IMO, they did so at their own peril and the plugin/theme
would already break on PHP 7.1+.
As PHP < 7.1 support is slated to be removed from WP anyway, I don't think
that plugins/themes which currently aren't compatible with PHP 7.1+ should
be a concern.
Also note that `_wp_delete_tax_menu_item()` is marked as a private
function, so has no promise of backward-compatibility anyhow.
Even so, for arguments sake, I've done a plugin + theme repository search
to see if I could find any problematic plugins or themes and the net
result is: 0.
Search results:
* [https://wpdirectory.net/search/01EFPPBHYSDM9J7KNSS3148H7Z Plugins using
`get_comment_delimited_block_content()` without passing arguments]: 0
* [https://wpdirectory.net/search/01EFPPC21895TJ3ZBGFQN2X892 Themes using
`get_comment_delimited_block_content()` without passing arguments]: 0
* [https://wpdirectory.net/search/01EFPPJ4N3N5ARQGDP80SQMM99 Plugins using
`do_enclose()` without passing arguments]: 11 - 100% false positives
* [https://wpdirectory.net/search/01EFPPJBMKET893GR9ZKC6XHF4 Themes using
`do_enclose()` without passing arguments]: 0
* [https://wpdirectory.net/search/01EFPPNP6B70SPZDKN07DFVBSX Plugins using
`_wp_delete_tax_menu_item()` without passing arguments]: 5 - 100% false
positives
* [https://wpdirectory.net/search/01EFPPP6YRHSFBB7ZV51PME9VH Themes using
`_wp_delete_tax_menu_item()` without passing arguments]: 0
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50343#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list