Jump to content

error when synchronizing products


florent*

Recommended Posts

Hello,

I am using a service that synchronizes prestashop with my ERP.

When we run it we get this error

[PHP Notice #8] Trying to access array offset 
on value of type null 
(/...classes/webservice/WebserviceOutputBuilder.php, line 716)

and 

[PHP Notice #8] Trying to access array offset 
on value of type null 
(/.../classes/webservice/WebserviceOutputBuilder.php, line 719)

 

line 716 is $field['value'] = $object_assoc['id'];

line 719 is $field['value'] = $object_assoc[$field_name];

foreach ($fields_assoc as $field_name => $field) {
            if (!is_array($this->fieldsToDisplay) || in_array($field_name, $this->fieldsToDisplay[$assoc_name])) {
                if ($field_name == 'id' && !isset($field['sqlId'])) {
                    $field['sqlId'] = 'id';
                    $field['value'] = $object_assoc['id'];
                } elseif (!isset($field['sqlId'])) {
                    $field['sqlId'] = $field_name;
                    $field['value'] = $object_assoc[$field_name];
                }
                $field['entities_name'] = $assoc_name;
                $field['entity_name'] = $resource_name;

                if (null !== $this->schemaToDisplay) {
                    $field['synopsis_details'] = $this->getSynopsisDetails($field);
                }
                $field['is_association'] = true;
                $output .= $this->setIndent($depth - 1) . $this->objectRender->renderField($field);
            }
        }

 

Does anyone please know how to fix it?

 

I'm using PrestaShop : 1.7.8.4

PHP : 7.4.28

Apache

MySQL : 10.3.34-MariaDB

 

Link to comment
Share on other sites

  • 2 months later...
  • 7 months later...
On 2/3/2023 at 8:54 AM, bronsky69 said:

I have same problem too

[PHP Notice #8] Trying to access array offset on value of type null (/var/www/clients/client2/web13/web/classes/webservice/WebserviceOutputBuilder.php, line 716)

I dont now how too fix  php 7.4 presta 1.7.88

Somone help me?

 

Did you change the version of PHP ?

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