Skip to content

Handle missing expiryDate in DomainRegistration::fromArray()#68

Merged
zbrag merged 1 commit intorealtimeregister:masterfrom
daan3011:fix/undefined-array-key-expiryDate
Mar 9, 2026
Merged

Handle missing expiryDate in DomainRegistration::fromArray()#68
zbrag merged 1 commit intorealtimeregister:masterfrom
daan3011:fix/undefined-array-key-expiryDate

Conversation

@daan3011
Copy link
Copy Markdown
Contributor

@daan3011 daan3011 commented Mar 8, 2026

Some domain registration responses omit expiryDate. Accessing $json['expiryDate'] directly could therefore trigger an Undefined array key "expiryDate" error.

This change safely reads the value with ?? and only creates a DateTime instance when a value is present, matching the nullable ?DateTime property.

@zbrag zbrag merged commit 9b76430 into realtimeregister:master Mar 9, 2026
5 checks passed
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.

2 participants