Everything worked fine up until the update to v201702. Now we are getting:

PHP Fatal error:  Cannot use object of type stdClass as array in 
/.../Util/XmlDeserializer.php on line 109

Here's the code that uses XmlDeserializer:
if ($batchJob->downloadUrl !== null && $batchJob->downloadUrl->url !== 
null) {
$xmlResponse = 
$batchJobUtils->DownloadBatchJobResults($batchJob->downloadUrl->url);
// printf("Downloaded results from %s:\n", $batchJob->downloadUrl->url);
$deserializer = new XmlDeserializer(BatchJobUtils::$CLASS_MAP);
$mutateResponse = $deserializer->ConvertXmlToObject($xmlResponse);
if (empty($mutateResponse)) {
// printf(" No results available.\n");
} elseif (isset($mutateResponse->rval)) {
foreach ($mutateResponse->rval as $mutateResult) {
// print_r($mutateResult);
if (is_array($mutateResult)) {
$outcome = $mutateResult->errorList === null ? 'SUCCESS' : 'FAILURE';
} else {
$outcome = $mutateResult === null ? 'SUCCESS' : 'FAILURE';
}
// printf(" Operation [%d] - %s\n", $mutateResult->index, $outcome);
}
}
} else {
// printf("No results available for download.\n");
}


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c7bdb40f-0fd9-4838-b289-76401aaaa3fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to