Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

PHP 8.1 - Uncaught TypeError: Dapr\Client\DaprHttpClient::tryDeleteStateAsync() #131

Open
madhancock opened this issue Aug 28, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@madhancock
Copy link

Getting the above type error when invoking DaprClient->deleteState().

The implementation for this in Dapr\Client\HttpStateTrait calls deleteStateAsync which in turn calls tryDeleteStateAsync - triggering the error. This is caused by tryDeleteStateAsync requiring an eTag, which is defined as a string and isn't nullable - yet null is passed in this instance.

image

There are some other type errors in that file too but in my scenario I've only run into the issue with deleteState. The workaround seems to be to used only the tryDeleteState functions, and provide an eTag.

Updating the definition of tryDeleteStateAsync to have string $etag = null, solves the problem and appears to be the intended definition.

@withinboredom withinboredom self-assigned this Aug 30, 2022
@withinboredom withinboredom added the bug Something isn't working label Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants