You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code Modernization: Replace some isset() ternary checks with null coalescing.
Since PHP 7.0 introduced the [https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op null coalescing operator], and WordPress now requires at least PHP 7.2.24, `isset( $var ) ? $var : null` ternary checks can be safely replaced with the more concise `$var ?? null` syntax.
As some new code using the null coalescing operator has already been introduced into core in recent releases, this commit continues with the code modernization by implementing incremental changes for easier review.
Props seanwei, getsyash, krupalpanchal, wildworks, jorbin, SergeyBiryukov.
Fixes #63430. See #58874.
git-svn-id: https://develop.svn.wordpress.org/trunk@61403 602fd350-edb4-49c9-b593-d223f7449a82
0 commit comments