[ENTITY][Note] Language can be null
This commit is contained in:
parent
4992ff153b
commit
b89f57ce93
@ -168,7 +168,7 @@ class Posting extends Component
|
|||||||
Actor $actor,
|
Actor $actor,
|
||||||
string $content,
|
string $content,
|
||||||
string $content_type,
|
string $content_type,
|
||||||
string $language,
|
?string $language = null,
|
||||||
array $attachments = [],
|
array $attachments = [],
|
||||||
array $processed_attachments = [],
|
array $processed_attachments = [],
|
||||||
array $process_note_content_extra_args = [],
|
array $process_note_content_extra_args = [],
|
||||||
@ -181,7 +181,7 @@ class Posting extends Component
|
|||||||
'content' => $content,
|
'content' => $content,
|
||||||
'content_type' => $content_type,
|
'content_type' => $content_type,
|
||||||
'rendered' => $rendered,
|
'rendered' => $rendered,
|
||||||
'language_id' => Language::getByLocale($language)->getId(),
|
'language_id' => !is_null($language) ? Language::getByLocale($language)->getId() : null,
|
||||||
'is_local' => true,
|
'is_local' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ class Note extends Entity
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLanguageId(): int
|
public function getLanguageId(): ?int
|
||||||
{
|
{
|
||||||
return $this->language_id;
|
return $this->language_id;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user