Ward against null value in language key of item array in Mastodon\Status object
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1357768936
This commit is contained in:
parent
b1b0bfc280
commit
6a17223289
|
@ -114,7 +114,7 @@ class Status extends BaseDataTransferObject
|
|||
$visibility = ['public', 'private', 'unlisted'];
|
||||
$this->visibility = $visibility[$item['private']];
|
||||
|
||||
$languages = json_decode($item['language'], true);
|
||||
$languages = json_decode($item['language'] ?? '', true);
|
||||
if (is_array($languages)) {
|
||||
reset($languages);
|
||||
$this->language = key($languages);
|
||||
|
|
Loading…
Reference in a new issue