Skip to content

Commit

Permalink
fix media type check
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Eichhorn committed Feb 4, 2024
1 parent d332790 commit 9628abd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,13 @@ public function getMediaTypeName(string $name) : MediaType
*/
public function hasMediaTypeId(int $id) : bool
{
return isset($this->types[$id]);
foreach ($this->types as $type) {
if ($type->id === $id) {
return true;
}
}

return false;
}

/**
Expand Down

0 comments on commit 9628abd

Please sign in to comment.