Jump to content

Expected argument of type "object, array or empty", "string" given


nouha88

Recommended Posts

Hello,
I have an issue.
After upgrading Prestashop to 1.7.8.7, once I open Invoices, it works fine at first.
Then suddenly I have this error: Expected argument of type "object, array or empty", "string" given.
I'm confused. I've tried to follow some of the solutions found on this forum and GitHub but it's weird, it's that it could at this very moment work well but suddenly then I get the error mentioned.
Did that happen to anyone of you?
What should I do?
Thank you.

image.png

image (1).png

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
On 1/9/2023 at 12:16 PM, nouha88 said:

Nevermind.

I've found a solution.

In case someone gets the same problem, here is it :

https://github.com/Matt75/fixconfigurationlang

It will definitely fix the issue.

It's not working with prestashop 8.1, can't be installed on PS 8.1, is it possible to update it?

Thanks for sharing such a useful tool.

Link to comment
Share on other sites

Hi @jamshidpour,

I had a look over it and the problem seems to be the fact that the module is not declared as compatible with PrestaShop 8. Other than that, it still works fine.

You can just do the following in order to make it work:
- download the latest archive
- unarchive it
- go into the fixconfigurationlang directory
- edit the fixconfigurationlang.php file
- replace line 44 ('max' => '1.7.99.99',) with the following: 'max' => '8.99.99',
- save the file
- archive the directory fixconfigurationlang directory

Once these steps are completed, you can try and upload the new archive. It should work at this point.

Link to comment
Share on other sites

16 hours ago, Andrei H said:

Hi @jamshidpour,

I had a look over it and the problem seems to be the fact that the module is not declared as compatible with PrestaShop 8. Other than that, it still works fine.

You can just do the following in order to make it work:
- download the latest archive
- unarchive it
- go into the fixconfigurationlang directory
- edit the fixconfigurationlang.php file
- replace line 44 ('max' => '1.7.99.99',) with the following: 'max' => '8.99.99',
- save the file
- archive the directory fixconfigurationlang directory

Once these steps are completed, you can try and upload the new archive. It should work at this point.

Thank you @Andrei H

As you told, it worked great after changing the config file.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...