[wp-trac] [WordPress Trac] #63430: Coding Standards: replace isset() ternary with null coalescing

WordPress Trac noreply at wordpress.org
Mon Sep 29 11:12:41 UTC 2025


#63430: Coding Standards: replace isset() ternary with null coalescing
-------------------------+-------------------------------
 Reporter:  seanwei      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  6.9
Component:  General      |     Version:
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |     Focuses:  coding-standards
-------------------------+-------------------------------

Comment (by wildworks):

 This ticket was featured on today's 6.9 Bug Scrub.

 It looks like there are a huge number of areas that need to be updated.
 Try searching using the following regular expression in your code editor.

  {{{
 isset\(\s*([^)]+?)\s*\)\s*\?\s*\1\s*:\s*([^\n;]+)
 }}}

 In my environment, 701 items and 208 files were found.

 Updating all of these in a single PR may be a bit risky, so we may want to
 consider how to split the work up.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63430#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list