Bug?

37 views
Skip to first unread message

Marius

unread,
May 5, 2016, 2:48:35 PM5/5/16
to AdWords API Forum
Hi,
For Adwords PHP API Library in this file: adwords/lib/Google/Api/Ads/AdWords/Util/v201603/ReportUtils.php there a bunch of this: throw new ReportDownloadException ("blahblah") but ReportDownloadException __construct requires two arguments: public function __construct($error, $httpCode)

Regards



Shwetha Vastrad (AdWords API Team)

unread,
May 5, 2016, 4:23:18 PM5/5/16
to AdWords API Forum
Hi Marius,

The constructor of ReportDownloadException.php accepts variable arguments, hence the code doesn't break when an exception occurs.

Cheers,
Shwetha, AdWords API Team.

Marius

unread,
May 5, 2016, 5:25:02 PM5/5/16
to AdWords API Forum
Here is the constructor:
public function __construct($error, $httpCode) { parent::__construct($error); $this->httpCode = $httpCode; }
And this is how is being called:
throw new ReportDownloadException('The client customer ID must be ' . 'specified for report downloads.');   (line 332: https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/AdWords/Util/v201603/ReportUtils.php)

You'll get this warning:
PHP Warning:  Missing argument 2 for ReportDownloadException::__construct(), called in lib/Google/Api/Ads/AdWords/Util/v201603/ReportUtils.php on line 332 and defined in lib/Google/Api/Ads/AdWords/Util/ReportDownloadException.php on line 39



Michael Cloonan (AdWords API Team)

unread,
May 6, 2016, 10:15:30 AM5/6/16
to AdWords API Forum
Hello,

If you have an issue with a specific client library, especially a technical one or a bug in the library itself, please report that at the library's GitHub issue tracker so that the owners of the library can take a look directly. Here's a link to the PHP one: https://github.com/googleads/googleads-php-lib/issues

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages