PHP7.4 Sentry issues
-
Hi there,
Since switching our site to PHP 7.4 and integrating Sentry we have got 100’s of instances of this msg:
ErrorException /wp-content/plugins/quiz-master-next/mlw_quizmaster2.php in include Deprecated: Unparenthesized 'a ? b : c ? d : e' is deprecated. Use either '(a ? b : c) ? d : e' or 'a ? b : (c ? d : e)'
Sentry flags this as from line 167 of quiz-master-next/mlw_quizmaster2.php which is an include to quiz-master-next/php/classes/class-qmn-quiz-creator.php. Looking at file I I believe the issue is the nested ternary on line 351.
Potential fix is to wrap the second ternary in parentheses:
'quiz_system' => isset( $mlw_qmn_duplicate_data->system ) ? $mlw_qmn_duplicate_data->system : (isset( $mlw_qmn_duplicate_data->quiz_system ) ? $mlw_qmn_duplicate_data->quiz_system : 0),
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP7.4 Sentry issues’ is closed to new replies.