Make WordPress Core


Ignore:
Timestamp:
01/03/2026 06:15:57 AM (3 months ago)
Author:
westonruter
Message:

Code Modernization: Update tests to use null coalescing operator in place of isset() in ternaries.

Developed as a subset of https://github.com/WordPress/wordpress-develop/pull/10654

Follow-up to [61404], [61403].

See #58874, #63430.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/link/getAdjacentPost.php

    r61066 r61424  
    193193
    194194        // Fake current page.
    195         $_post           = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null;
     195        $_post           = $GLOBALS['post'] ?? null;
    196196        $GLOBALS['post'] = get_post( $p1 );
    197197
     
    230230
    231231        // Fake current page.
    232         $_post           = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null;
     232        $_post           = $GLOBALS['post'] ?? null;
    233233        $GLOBALS['post'] = get_post( $p1 );
    234234
Note: See TracChangeset for help on using the changeset viewer.