mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-16 09:18:42 +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
|
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