mirakl / sdk-php-shop

Mirakl PHP SDK for sellers
29 stars 16 forks source link

GetOrderDocumentsRequest results in "Array to string conversion" ErrorException #62

Closed N3XT0R closed 6 months ago

N3XT0R commented 6 months ago

Hello Guys, there is actually one bug by using the version 1.20.0 that not has been with version 1.19.0:

$orderIds = ['XYZ_123456']; $request = new GetOrderDocumentsRequest($orderIds); $client->run($request);

There happens an Error on line 341 in vendor/mirakl/sdk-php-shop/src/Mirakl/Core/Client/AbstractApiClient.php

Array to string conversion

Because the input on this line on "implode" is a multidimensional array now:

array:1 [ // vendor/mirakl/sdk-php-shop/src/Mirakl/Core/Client/AbstractApiClient.php:341 0 => array:1 [ 0 => "XYZ_123456" ] ]

Also the inline documentation about the request is wrong inside the Request Class.

Please fix it. it looks like that has something to do with the refactoring on AbstractApiClient.php