Skip to content

Commit 466bf4e

Browse files
committed
Update LEAccount.php
1 parent 5d71f56 commit 466bf4e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/LEAccount.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ private function getLEAccountData()
132132
if($post['status'] === 200)
133133
{
134134
$this->id = isset($post['body']['id']) ? $post['body']['id'] : '';
135-
$this->key = $post['body']['key'];
136-
$this->contact = $post['body']['contact'];
135+
$this->key =isset($post['body']['key']) ? $post['body']['key'] : '';
136+
$this->contact = isset($post['body']['contract']) ? $post['body']['contract'] : '';
137137
$this->agreement = isset($post['body']['agreement']) ? $post['body']['agreement'] : '';
138-
$this->initialIp = $post['body']['initialIp'];
139-
$this->createdAt = $post['body']['createdAt'];
140-
$this->status = $post['body']['status'];
138+
$this->initialIp = isset($post['body']['initialIp']) ? $post['body']['initialIp'] : '';
139+
$this->createdAt = isset($post['body']['createdAt']) ? $post['body']['createdAt'] : '';
140+
$this->status = isset($post['body']['status']) ? $post['body']['status'] : '';
141141
}
142142
else
143143
{
@@ -161,12 +161,13 @@ public function updateAccount($email)
161161
if($post['status'] === 200)
162162
{
163163
$this->id = isset($post['body']['id']) ? $post['body']['id'] : '';
164-
$this->key = $post['body']['key'];
165-
$this->contact = $post['body']['contact'];
164+
$this->key =isset($post['body']['key']) ? $post['body']['key'] : '';
165+
$this->contact = isset($post['body']['contract']) ? $post['body']['contract'] : '';
166166
$this->agreement = isset($post['body']['agreement']) ? $post['body']['agreement'] : '';
167-
$this->initialIp = $post['body']['initialIp'];
168-
$this->createdAt = $post['body']['createdAt'];
169-
$this->status = $post['body']['status'];
167+
$this->initialIp = isset($post['body']['initialIp']) ? $post['body']['initialIp'] : '';
168+
$this->createdAt = isset($post['body']['createdAt']) ? $post['body']['createdAt'] : '';
169+
$this->status = isset($post['body']['status']) ? $post['body']['status'] : '';
170+
170171
if($this->log instanceof \Psr\Log\LoggerInterface)
171172
{
172173
$this->log->info('Account data updated.');

0 commit comments

Comments
 (0)