Skip to content

Fix TypeError in runReport after upgrading to 5.5.2#535

Merged
freekmurze merged 3 commits intospatie:mainfrom
abr4xas:fix-typeerror-runreport-5.5.2
Feb 20, 2025
Merged

Fix TypeError in runReport after upgrading to 5.5.2#535
freekmurze merged 3 commits intospatie:mainfrom
abr4xas:fix-typeerror-runreport-5.5.2

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants