Jump to content

Order validation error : Cannot use a scalar value as an array


johannes-witram

Recommended Posts

Hello,

i get the following error in some (not all) paypal payments:

Order validation error : Cannot use a scalar value as an array; File: /homepages/4/d808779059/htdocs/clickandbuilds/PrestaShop/MyeCommerce/classes/Tools.php; Line: 4005;

There is also a bank wirement with a similar error message.

The problem is that no invoice is created, and if i want to do this manually, in debug mode, the message appears: : [ErrorException Code 0]: Warning: Trying to access array offset on value of type float

Have you any ideas to fix that? And why is it just in some cases?

Thank you

Link to comment
Share on other sites

1 hour ago, johannes-witram said:

Hello,

i get the following error in some (not all) paypal payments:

Order validation error : Cannot use a scalar value as an array; File: /homepages/4/d808779059/htdocs/clickandbuilds/PrestaShop/MyeCommerce/classes/Tools.php; Line: 4005;

There is also a bank wirement with a similar error message.

The problem is that no invoice is created, and if i want to do this manually, in debug mode, the message appears: : [ErrorException Code 0]: Warning: Trying to access array offset on value of type float

Have you any ideas to fix that? And why is it just in some cases?

Thank you

As a bug report, this is almost useless.

 - what is your Prestashop version?

 - can you provide screendumps of those errors so that we see the context?

 - you talk about "a bank wirement with a similar error message". Similar is not the same. Thus different. Thus another screendump and error report are needed.

 - "if i want to do this manually, in debug mode, the message appears: : [ErrorException Code 0]". This sounds like an Ajax error. See here how to debug that.

Link to comment
Share on other sites

the bug came after the upgrade of 1.7.6 to 8.1.2.

looking at the paypal payment process, you see screenshot 1 (at the bottom).

when i try to create an invoice or to change the status of the order, the message is seen in screenshot 2 (in the middle).

on trying to create an invoice for the order with bank wirement, you see screenshot 3 (the upper one).

3.png

2.png

1.png

Edited by johannes-witram (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

There was an issue with the legalcompliance module for europe. When disactivated, there was no problem. But the module is necessary for me, and i made the whole shop new. data was migrated into the new shop, so it was not too much to do. maybe there was an update failure.

Link to comment
Share on other sites

Thanks for your reply! That helped a lot: in my case legalcompliance was just deactivated, after activation, everything works fine.
In 8.1 it´s not so easy to spot, if a module is active or not....

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...