-
Notifications
You must be signed in to change notification settings - Fork 6
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
Exception throw when calling Paddle\SDK\Entities\Event::from() with SubscriptionUpdated event #107
Comments
Hello @tigerbook73 👋 Thank you for raising this issue. We'll make a fix for this in the next patch release, and will update this issue accordingly |
I have encountered a similar issue. Here is the full log.
|
Hello 👋 This issue has now been fixed in release v1.7.1 |
Hi, We have encountered another issue after the update. Below is exception from the log.
|
Hello @N-M With the fix released in |
Hi @davidgrayston-paddle, sorry for the false alarm. An environment that I checked was not updated. |
Describe the bug
When try to build a SubscriptionUpdated Notification from Paddle\SDK\Entities\Event::from(data), exception thrown.
Reason:
In the subscription.updated event, the event.data.discount.started_at field may be null in a special scenario. This makes the invoking of Paddle\SDK\Entities\Event::from() failed.
Steps to reproduce
Line: 29 DateTime::from($data['starts_at'])
"message": "Paddle\SDK\Notifications\Entities\DateTime::from(): Argument #1 ($date) must be of type DateTimeInterface|string, null given,
Expected behavior
SubscriptionUpdated object can be successfully constructed from Event::from(...) call.
Code snippets
No response
PHP version
PHP 8.1
SDK version
paddle-php-sdk 1.20.1
API version
Paddle verson 1
Additional context
No response
The text was updated successfully, but these errors were encountered: