Home Forums Support Oops error. Deprecated Parenthesis

This topic contains 5 replies, has 3 voices, and was last updated by  linuxmax 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23344

    bartdyer
    Participant

    I am getting the following errors. Might site is completely unusable, but the automated emails are still firing.

    [2020-01-23 02:49:20] production.ERROR: ***ErrorException*** [0] : /home/longbark/public_html/billing/app/Models/Account.php [Line 1126] => Unparenthesized a ? b : c ?: d is deprecated. Use either (a ? b : c) ?: d or a ? b : (c ?: d)

    The line in question is 1126 which is below. Not sure the resolution.

    $currencyId = ($client && $client->currency_id) ? $client->currency_id : $this->currency_id ?: DEFAULT_CURRENCY;

    #23345

    Hillel Coren
    Keymaster

    Which version of PHP are you using?

    #23346

    bartdyer
    Participant

    7.4

    #23347

    bartdyer
    Participant

    well, turned out to be easy fix

            $currencyId = (($client && $client->currency_id) ? $client->currency_id : $this->currency_id) ?: DEFAULT_CURRENCY;
    
    #23348

    Hillel Coren
    Keymaster

    Thanks, 7.4 isn’t supported

    #24502

    linuxmax
    Participant

    Perfect!!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Posted in: