Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doctrine mapping #2420

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Model/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ abstract class Media implements MediaInterface, \Stringable

protected ?int $height = null;

protected ?float $length = null;
protected ?string $length = null;

protected ?string $copyright = null;

Expand Down Expand Up @@ -184,12 +184,12 @@ public function getHeight(): ?int

public function setLength(?float $length): void
{
$this->length = $length;
$this->length = null !== $length ? (string) $length : null;
}

public function getLength(): ?float
{
return $this->length;
return null !== $this->length ? (float) $this->length : null;
}

public function setCopyright(?string $copyright): void
Expand Down
Loading