Skip to content

Commit

Permalink
Use a default timestamp for custom Sentry event
Browse files Browse the repository at this point in the history
This fixes a potential crash that could happen if the `Event` object is later used for encrypted logging
  • Loading branch information
jkmassel committed Oct 13, 2020
1 parent 33fb2ea commit a2e9db3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions WordPress/Classes/Utility/Logging/SentryStartupEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extension CrashLogging {
let event = Event(level: .error)
event.message = error.localizedDescription
event.extra = userInfo ?? (error as NSError).userInfo
event.timestamp = Date()

Client.shared?.snapshotStacktrace {
Client.shared?.appendStacktrace(to: event)
Expand Down

0 comments on commit a2e9db3

Please sign in to comment.