LEAccount Warning if LetsEncrypt omits contact
Opened this issue · 0 comments
skwirrel commented
We have experienced occassional warnings generated in LEAccount.php around line 136:
$this->id = isset($post['body']['id']) ? $post['body']['id'] : '';
$this->key = $post['body']['key'];
>>> $this->contact = $post['body']['contact']; <<< HERE
I'm not entirely sure why but it seems that LetsEncrypt sometimes fails to return a contact. Using a null coalescing operator to supply a default empty array fixed this for us thus:
$this->contact = $post['body']['contact'] ?? [];
Hope that helps.