[Version 4.5.19 (Softaculous)] Whoops Install Error Fix

I found a bug from a fresh install of Invoice Ninja via Softaculous that can cause a Whoops error right off the bat using version 4.5.19. The error occurs on /app/Models/Account.php and the current line of code is:

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

which is currently deprecated. You can fix this by changing the line to the new format:

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

This fixed the error for me!

Are you using PHP 7.4? With v4 you need to use 7.3.

1 Like

I am, I didnt even think about that. Will v5 have 7.4 + support?

Yes, v5 supports PHP 7.4

1 Like

Awesome to hear! If you wish to close this post that would be fine and Ill close my github issue. Thanks!