fix media type check

This commit is contained in:
Dennis Eichhorn 2024-02-04 21:27:45 +00:00
parent d332790d4c
commit 9628abd3e3

View File

@ -481,7 +481,13 @@ class Media implements \JsonSerializable
*/
public function hasMediaTypeId(int $id) : bool
{
return isset($this->types[$id]);
foreach ($this->types as $type) {
if ($type->id === $id) {
return true;
}
}
return false;
}
/**