Problem/Motivation
Notice thrown when on PHP 7.4
Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in sites/all/modules/ms_core/ms_core.forms.inc on line 1425
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-3210551-2-5.txt | 1.58 KB | fenstrat |
| #5 | 3210551-5.patch | 2.31 KB | fenstrat |
Comments
Comment #2
spokjeComment #3
tonka67 commentedPatch applies clean and appears to have resolved the issue. Thanks!
Comment #4
fenstratLooks like the correct approach. #2 fixes static analysis:
The left-associativity of the ternary operator has been deprecated in PHP 7.4 and removed in PHP 8.0. Multiple consecutive ternaries detected. Use parenthesis to clarify the order in which the operations should be executedComment #5
fenstratActually a couple more nested ternaries needed adjusting. These things are a nightmare.