PHP SDK Object in Sandbox, Array in Production

PHP SDK Object in Sandbox, Array in Production

I'm using the PHP SDK to connect to the Zoho CRM API to retrieve Quote data. 

Within the data returned are details of the quote owner ("Owner") and products ("Product_Details").

On the production version, the Owner and Product_Details are arrays so I can use:
  1. $userID= $quoteData['Owner']['id];
  2. foreach ($quoteData['Product_Details'] as $pd) {
    1. $prodIDs[] = $pd['product']['id'];
  3. }
However, if I switch to sandbox, which is a clone of the production I get errors such as:
  1. Cannot use object of type com\zoho\crm\api\record\InventoryLineItems as array
So the code has to be rewritten as:
  1. $owner=$quoteData['Owner'];
  2. $userID= $owner->getID();
  3. foreach ($quoteData['Product_Details'] as $pd) {
    1. $pdProd=$pd->getProduct();
    2. $prodIDs[] = $pdProd->getID();
  4. }
This then works on Sandbox but not Production.

Is there a setting somewhere that I am missing which switches objects to arrays or vice versa. I don't mind which is correct, but it needs to be consistent on both Prod and Sandbox.
Thanks
Andy