After upgrading PHP version from 7.3 to 7.4 I'm getting one deprecated issue.
[27-Nov-2020 01:14:32 UTC] PHP Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/lankalk/public_html/chat/sender.php on line 364
In line 364 and 365 of sender.php has following code:
$img_ext = ($image_sizes[2] == 1)? "gif":
($image_sizes[2] == 2) ? "jpg":"png";
Please suggest me code upgrade
It looks like you wanted to have something like this:
However, this is not what your ternary does at the moment. It looks like it was a bug.
If you would like to keep a nested ternary (which is not recommended as the
ifstatement is easier to understand) then you need to use parentheses to specify which condition is first.