mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
Merge pull request #10305 from annando/warnings
Fix warning "reset() expects parameter 1 to be array, null given"
This commit is contained in:
commit
280d0ee961
1 changed files with 6 additions and 2 deletions
|
@ -114,8 +114,12 @@ class Status extends BaseDataTransferObject
|
||||||
$this->visibility = $visibility[$item['private']];
|
$this->visibility = $visibility[$item['private']];
|
||||||
|
|
||||||
$languages = json_decode($item['language'], true);
|
$languages = json_decode($item['language'], true);
|
||||||
reset($languages);
|
if (is_array($languages)) {
|
||||||
$this->language = is_array($languages) ? key($languages) : null;
|
reset($languages);
|
||||||
|
$this->language = key($languages);
|
||||||
|
} else {
|
||||||
|
$this->language = null;
|
||||||
|
}
|
||||||
|
|
||||||
$this->uri = $item['uri'];
|
$this->uri = $item['uri'];
|
||||||
$this->url = $item['plink'] ?? null;
|
$this->url = $item['plink'] ?? null;
|
||||||
|
|
Loading…
Reference in a new issue