Skip to content

Commit

Permalink
Add isset
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Mar 9, 2021
1 parent bda7a52 commit 3184afc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected function handleCustomerSubscriptionUpdated(array $payload)
$subscription->ends_at = $subscription->onTrial()
? $subscription->trial_ends_at
: Carbon::createFromTimestamp($data['current_period_end']);
} elseif ($data['cancel_at']) {
} elseif (isset($data['cancel_at'])) {
$subscription->ends_at = Carbon::createFromTimestamp($data['cancel_at']);
} else {
$subscription->ends_at = null;
Expand Down

0 comments on commit 3184afc

Please sign in to comment.