Make WordPress Core


Ignore:
Timestamp:
01/10/2026 05:27:32 AM (5 months ago)
Author:
westonruter
Message:

Code Modernization: Use null coalescing operator in additional isset() ternaries.

These had been missed previously due to additional parentheses around the isset() expressions.

Developed in https://github.com/WordPress/wordpress-develop/pull/10704

Follow-up to [61463], [61457], [61456], [61455], [61454], [61453], [61445], [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props soean.
See #58874, #63430.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r61434 r61464  
    106106        }
    107107
    108         $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
     108        $search = $_REQUEST['s'] ?? '';
    109109
    110110        $post_type = ( isset( $_REQUEST['post_type'] ) ) ? sanitize_key( $_REQUEST['post_type'] ) : '';
    111111
    112         $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : '';
    113 
    114         $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : '';
    115         $order   = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
     112        $user_id = $_REQUEST['user_id'] ?? '';
     113
     114        $orderby = $_REQUEST['orderby'] ?? '';
     115        $order   = $_REQUEST['order'] ?? '';
    116116
    117117        $comments_per_page = $this->get_per_page( $comment_status );
Note: See TracChangeset for help on using the changeset viewer.