Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

deprecated: Nested ternary expressions

$
0
0

Replies: 0

This line of code needs some love…

wp-content/plugins/popup-builder/com/helpers/AdminHelper.php#1668

> Warning: Nested ternary expressions (without parentheses) deprecated in PHP 7.4. Targeting PHP 8.1.0. in

Readme: https://wiki.php.net/rfc/ternary_associativity



$systemInfoContent .= 'WP_DEBUG:'.(defined('WP_DEBUG') ? WP_DEBUG ? 'Enabled' : 'Disabled' : 'Not set')."\n";

P.S. I keep away from nested ternaries as far as possible, so I’m not an expert, but “‘Enabled’ : ‘Disabled’ : ‘Not set'” doesn’t make sense to me.


Viewing all articles
Browse latest Browse all 59525

Trending Articles