I am trying to get this site updated to Invoice Ninja v4.5.50 so I can hopefully resolve the migration issues I have been having.
When I update to PHP 7.4 and try to view the Invoice Ninja site it just says “Whoops. Looks like something went wrong”
This is the last entry in the error log:
[2024-08-31 06:43:34] production.ERROR: ***ErrorException*** [0] : /home/billing1/public_html/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)` {"context":"PHP","user_id":1,"account_id":1,"user_name":"Michael Mason","method":"POST","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","locale":"en","ip":"138.199.30.167","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"save_sidebar_state"} []
[2024-08-31 06:43:36] production.ERROR: ***ErrorException*** [0] : /home/billing1/public_html/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)` {"context":"PHP","user_id":1,"account_id":1,"user_name":"Michael Mason","method":"POST","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","locale":"en","ip":"138.199.30.167","count":2,"is_console":"no","is_api":"no","db_server":"mysql","url":"save_sidebar_state"} []
[2024-08-31 06:43:43] production.ERROR: ***ErrorException*** [0] : /home/billing1/public_html/app/Models/Account.php [Line 1126] => Unparenthesized `a ? b : c ?: d` is deprecated. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)` {"context":"PHP","user_id":1,"account_id":1,"user_name":"Michael Mason","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","locale":"en","ip":"138.199.30.167","count":3,"is_console":"no","is_api":"no","db_server":"mysql","url":"dashboard"} []
Here’s that line from that file:
$currencyId = ($client && $client->currency_id) ? $client->currency_id : $this->currency_id ?: DEFAULT_CURRENCY;
Can you perhaps help with this and then we can look at the migration?