Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

JSON Object returns now also Previous and Next in array when using: $api->parcels->get #18

Open
marcdelange12345 opened this issue Nov 7, 2018 · 0 comments

Comments

@marcdelange12345
Copy link

marcdelange12345 commented Nov 7, 2018

JSON Object returns now also Previous and Next in array when using: $api->parcels->get
Due to the array_shift only the first part of the array is added to the response, which is are not the Parcels anymore.

Used reversed so that after Next and Previous will be removed it also will work.

Quick and very dirty fix:
Old:
if (!empty($return_object)) { //reversed by Marc due to a bug. $response_body = array_reverse($response_body); $response_body = array_shift($response_body); }
New:
if (!empty($return_object)) { //reversed by Marc due to a change. $response_body = array_reverse($response_body); $response_body = array_shift($response_body); }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant