mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-11 17:08:40 +00:00
fix media type check
This commit is contained in:
parent
d332790d4c
commit
9628abd3e3
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user