Fix bug in Spectre import.

This commit is contained in:
James Cole 2018-08-13 18:30:47 +02:00
parent 9c5463e515
commit 60e262dece
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -67,8 +67,8 @@ class Account extends SpectreObject
$this->nature = $data['nature'];
$this->createdAt = new Carbon($data['created_at']);
$this->updatedAt = new Carbon($data['updated_at']);
foreach ($data['extra'] as $key => $value) {
$extraArray = \is_array($data['extra']) ? $data['extra'] : [];
foreach ($extraArray as $key => $value) {
$this->extra[$key] = $value;
}
}