You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call to a member function getName() on null {"exception":"[object] (Error(code: 0): Call to a member function getName() on null at /www/vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Util/FieldMasks.php:307
I have change event in path geo_target_type_setting.positive_geo_target_type and new value is 7. Code that gives error FieldMasks.php:307 uses getValueDescriptorByIndex($index), but 7 is not the index, it is number. Your enum has "holes" and number does not match index, see PositiveGeoTargetType.
The only workaround I can think of is modifying my instance of lib for now, so it does this:
$property = new \ReflectionProperty(get_class($fieldDescriptor->getEnumType()), 'internal_desc');
$property->setAccessible(true);
$fieldValue = $property->getValue($fieldDescriptor->getEnumType())->getValueByNumber($fieldValue)->getName();
Expected behavior:
Returns PRESENCE
The text was updated successfully, but these errors were encountered:
Could you please post on the Google Ads API forum and refer to this issue?
Please tell the agent on the forum that you want to privately share information with the PHP client library owner.
They'll guide you how to Reply privately to them. Share your customer ID there, so I can try reproducing this issue.
Thanks!
Your client library and Google Ads API versions:
v22.1.0
V16
Your environment:
Linux a59f316b98dd 6.8.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:25:01 UTC 2024 x86_64
protobuf
is used or not: No.grpc
is used or not: No.grpc
orrest
): RestDescription of the bug:
I've been retrieving account change history like example suggests: https://developers.google.com/google-ads/api/samples/get-change-details#php
Getting following error:
I have change event in path
geo_target_type_setting.positive_geo_target_type
and new value is7
. Code that gives errorFieldMasks.php:307
usesgetValueDescriptorByIndex($index)
, but 7 is not the index, it is number. Your enum has "holes" and number does not match index, seePositiveGeoTargetType
.The only workaround I can think of is modifying my instance of lib for now, so it does this:
Expected behavior:
Returns
PRESENCE
The text was updated successfully, but these errors were encountered: