WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/15/2020 01:38:52 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Fix PHP 8 deprecation notices for optional function parameters declared before required parameters.

As it already was not possible to pass the required parameters without also passing the optional one anyway, removing the default value for the (not so) optional parameters should not affect backward compatibility.

This change affects three functions in core:

  • get_comment_delimited_block_content()
  • do_enclose()
  • _wp_delete_tax_menu_item()

Props jrf, ayeshrajans, desrosj.
Fixes #50343.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php

    r48499 r48794  
    15701570    }
    15711571
    1572     protected function check_post_data( $attachment, $data, $context = 'view', $links ) {
     1572    protected function check_post_data( $attachment, $data, $context = 'view', $links = array() ) {
    15731573        parent::check_post_data( $attachment, $data, $context, $links );
    15741574
Note: See TracChangeset for help on using the changeset viewer.