[ENTITY][Actor] Init Actor's class variable homepage, bio, and location to null
The template cards/profile/view.html.twig tries to access the bio variable before it's initialized, an is null check was already in place. However, even then, the variable needs to be init beforehand. The same change was applied to homepage and location since they might lead to similar issues.
This commit is contained in:
parent
622057ba0d
commit
918e6823a9
|
@ -60,9 +60,9 @@ class Actor extends Entity
|
||||||
private ?string $fullname = null;
|
private ?string $fullname = null;
|
||||||
private int $roles = 4;
|
private int $roles = 4;
|
||||||
private int $type;
|
private int $type;
|
||||||
private ?string $homepage;
|
private ?string $homepage = null;
|
||||||
private ?string $bio;
|
private ?string $bio = null;
|
||||||
private ?string $location;
|
private ?string $location = null;
|
||||||
private ?float $lat;
|
private ?float $lat;
|
||||||
private ?float $lon;
|
private ?float $lon;
|
||||||
private ?int $location_id;
|
private ?int $location_id;
|
||||||
|
@ -378,12 +378,12 @@ class Actor extends Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $tags array of strings to become self tags
|
* @param array $tags array of strings to become self tags
|
||||||
* @param null|array $existing array of existing self tags (ActorTag[])
|
* @param null|array $existing array of existing self tags (ActorTag[])
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setSelfTags(array $tags, ?array $existing = null): self
|
public function setSelfTags(array $tags, ?array $existing = null): self
|
||||||
{
|
{
|
||||||
$tags = F\filter($tags, fn ($tag) => Nickname::isCanonical($tag)); // TODO: Have an actual #Tag test
|
$tags = F\filter($tags, fn ($tag) => Nickname::isCanonical($tag)); // TODO: Have an actual #Tag test
|
||||||
$tags = array_unique($tags);
|
$tags = array_unique($tags);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user