Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Feb 4, 2022
1 parent 820f3ee commit 241b9e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/Entity/MediaTrait/MediaNameTrait.php
Expand Up @@ -16,7 +16,7 @@ trait MediaNameTrait
/**
* @ORM\Column(type="text", options={"default": ""}, nullable=true)
*/
protected string $names = '';
protected ?string $names = '';

public function __toString(): string
{
Expand Down Expand Up @@ -60,6 +60,8 @@ public function getNamesParsed(): array
*/
public function getNames(bool $yamlParsed = false)
{
$this->names = (string) $this->names;

return $yamlParsed && '' !== $this->names ? Yaml::parse($this->names) : $this->names;
}

Expand Down

0 comments on commit 241b9e4

Please sign in to comment.