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

The "ts" field could be seen as an integer, we must allow string and number #34

Merged
merged 2 commits into from
Apr 23, 2019

Conversation

damienalexandre
Copy link
Member

I got this error while testing #23:

TypeError: Argument 1 passed to JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItem::setTs() must be of the type string or null, integer given, called in /home/dalexandre/Dev/slack-php-api/generated/Normalizer/ObjsMessageAttachmentsItemNormalizer.php on line 108

That's hard to reproduce but sometime the Slack API will return a valid integer, so we can't rely on PHP strict type for those "ts" fields.

This PR fix this and also fix the patch format. cc @pyrech

> TypeError: Argument 1 passed to JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItem::setTs() must be of the type string or null, integer given, called in /home/dalexandre/Dev/slack-php-api/generated/Normalizer/ObjsMessageAttachmentsItemNormalizer.php on line 108
@damienalexandre damienalexandre merged commit 0345e7c into master Apr 23, 2019
@damienalexandre damienalexandre deleted the sometimeItsNumber branch April 23, 2019 09:49
damienalexandre added a commit that referenced this pull request Apr 23, 2019
The "ts" field could be seen as an integer, we must allow string and number
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.

None yet

1 participant