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); }
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); }