GetAccountHierarchy (PHP) error array_key_exists()

41 views
Skip to first unread message

Mihai Iliescu

unread,
Apr 25, 2017, 5:02:15 AM4/25/17
to AdWords API Forum
Hello

I have a problem with the AdWords Api (PHP). When I run GetAccountHierarchy.php I get the following errors:

( ! ) Warning: array_key_exists(): The first argument should be either a string or an integer in C:\wamp\www\api\app\GetAccountHierarchy.php on line 84
Call Stack
#TimeMemoryFunctionLocation
10.0010279936{main}( )..\GetAccountHierarchy.php:0
20.0050719408Google\AdsApi\Examples\AdWords\v201609\AccountManagement\GetAccountHierarchy::main( )..\GetAccountHierarchy.php:148
30.01902061840Google\AdsApi\Examples\AdWords\v201609\AccountManagement\GetAccountHierarchy::runExample( )..\GetAccountHierarchy.php:144
41.15013655608array_key_exists ( )..\GetAccountHierarchy.php:84
(Customer ID, Account Name) 2975983167, Test 1 
( ! ) Warning: array_key_exists(): The first argument should be either a string or an integer in C:\wamp\www\api\app\GetAccountHierarchy.php on line 122
Call Stack
#TimeMemoryFunctionLocation
10.0010279936{main}( )..\GetAccountHierarchy.php:0
20.0050719408Google\AdsApi\Examples\AdWords\v201609\AccountManagement\GetAccountHierarchy::main( )..\GetAccountHierarchy.php:148
30.01902061840Google\AdsApi\Examples\AdWords\v201609\AccountManagement\GetAccountHierarchy::runExample( )..\GetAccountHierarchy.php:144
41.15113656952Google\AdsApi\Examples\AdWords\v201609\AccountManagement\GetAccountHierarchy::printAccountHierarchy( )..\GetAccountHierarchy.php:93
51.15113657048Google\AdsApi\Examples\AdWords\v201609\AccountManagement\GetAccountHierarchy::printAccountHierarchy( )..\GetAccountHierarchy.php:114
61.15113657128array_key_exists ( )..\GetAccountHierarchy.php:122

Does anyone have any pointers on how to solve this?

Shwetha Vastrad (AdWords API Team)

unread,
Apr 25, 2017, 1:52:10 PM4/25/17
to AdWords API Forum
Hi, 

Could you provide the complete GetAccountHierarchy.php code and the SOAP request and response logs? I see that the AdWords account 2975983167 is a client account. If you run this example against a client account, only that account will be returned in the response. Please use Reply privately to author when responding. 

Thanks,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages