Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

LEAccount Warning if LetsEncrypt omits contact #126

Open
skwirrel opened this issue Aug 7, 2023 · 0 comments
Open

LEAccount Warning if LetsEncrypt omits contact #126

skwirrel opened this issue Aug 7, 2023 · 0 comments

Comments

@skwirrel
Copy link

skwirrel commented Aug 7, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant