Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix TypeError in runReport after upgrading to 5.5.2 #535

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

abr4xas
Copy link
Contributor

@abr4xas abr4xas commented Feb 19, 2025

This PR fixes a TypeError that occurs after upgrading to version 5.5.2.

When calling runReport(), the method expects an argument of type Google\Analytics\Data\V1beta\RunReportRequest, but an array is being passed instead. This results in the following error:

TypeError: Google\Analytics\Data\V1beta\Client\BetaAnalyticsDataClient::runReport(): 
Argument #1 ($request) must be of type Google\Analytics\Data\V1beta\RunReportRequest, array given

This fix will ensure that the request argument passed to runReport() is correctly instantiated as a RunReportRequest object instead of an array.

This will solve #534

- This fix will ensure that the request argument passed to `runRealtimeReport()` is correctly instantiated as a `RunRealtimeReportRequest`  object instead of an array.
@freekmurze freekmurze merged commit 0d09314 into spatie:main Feb 20, 2025
19 checks passed
@abr4xas abr4xas deleted the fix-typeerror-runreport-5.5.2 branch February 20, 2025 12:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants