Can't edit Invoice

Hi,

I’m experimenting an issue with selfhost V4 with message : Whoops, looks like something went wrong.

I can create an invoice but when saving I get the error message and then, I can’t open any invoices.

I switched from PHP 7.4 to 7.3 to 8.0 back to 7.3. Not resolving issue.
I updated IN to latest V4.5.40. Not resolving issue and getting error message : Trying to access array offset on value of type int

Here is last error_log entries.

[2021-06-16 01:45:50] production.ERROR: ErrorException [0] : /home/mypathtoinvoiceninja/public_html/app/Models/Traits/Inviteable.php [Line 77] => implode(): Passing glue string after array is deprecated. Swap the parameters {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“user”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36”,“locale”:“fr_CA”,“ip”:“12.34.56.78”,“count”:11,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“invoices/203/edit”} []

[2021-06-16 01:45:58] production.ERROR: ErrorException [0] : /home/mypathtoinvoiceninja/public_html/vendor/symfony/console/Input/ArrayInput.php [Line 135] => Trying to access array offset on value of type int {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“user”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36”,“locale”:“fr_CA”,“ip”:“12.34.56.78”,“count”:12,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“update”} []

And, when trying to edit an invoice with APP_DEBUG set to true :

(1/1) ErrorException

implode(): Passing glue string after array is deprecated. Swap the parameters

Thanks for any help

Hi,

Changing from PHP 7.4 to 7.3 should resolve the error.

As mentioned in my previous post, I am already on PHP 7.3

Sorry, that’s the only cause I’m aware of for that error. Maybe try setting a phpinfo page to confirm the PHP version.

Mmm curious, PHP was set to 7.3 in host dashboard, but not effectively. It’s now working, Thanks

Hi. I just had to roll back from PHP 7.4 to 7.3 for this same fix. Thanks for the notes, friends! Will Invoice Ninja 4 ever be compatible with a newer version of PHP? I just learned about version 5 today while trying to troubleshoot this problem, and I wonder how long I can ride on 4.

We don’t have immediate plans to support PHP 7.4 with v4 but would probably accept a PR with the changes.