readdle/app-store-server-api

GetNotificationHistoryQueryParams - TypeError

Closed this issue · 1 comments

Thanks for merging my previous PR.

When making a request to getNotificationHistory, when there are multiple pages available I'm receiving the error:

TypeError: Argument 1 passed to Readdle\AppStoreServerAPI\RequestQueryParams\GetNotificationHistoryQueryParams::__construct() must be of the type array, object given, called in /var/www/app/vendor/readdle/app-store-server-api/src/Response/PageableResponse.php on line 69 in file /var/www/app/vendor/readdle/app-store-server-api/src/RequestQueryParams/GetNotificationHistoryQueryParams.php on line 8

GetNotificationHistoryQueryParams construct takes $params as an array however on Readdle\AppStoreServerAPI\Response\PageableResponse::66 the first arg being passed in is the keys object.

If you could have a look please that'd be great. If I can put together a solution in the meantime I'll submit a PR.

It was my mistake. I accepted previous PR too fast without proper checking it because of absence of time...
The problem was that get_class($page->originalRequest) was replaced with get_class($queryParams).
Fixed in v3.5.2