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-includes/class-wp-xmlrpc-server.php

    r61463 r61464  
    44504450
    44514451        $parent_id = ( isset( $struct['parent_id'] ) ) ? absint( $struct['parent_id'] ) : '';
    4452         $mime_type = ( isset( $struct['mime_type'] ) ) ? $struct['mime_type'] : '';
     4452        $mime_type = $struct['mime_type'] ?? '';
    44534453        $offset    = ( isset( $struct['offset'] ) ) ? absint( $struct['offset'] ) : 0;
    44544454        $number    = ( isset( $struct['number'] ) ) ? absint( $struct['number'] ) : -1;
Note: See TracChangeset for help on using the changeset viewer.