Skip to content

Commit

Permalink
Merge branch 'release-15.39.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 14, 2024
2 parents f85999a + f0ef2b9 commit 52391ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/kernel/classes/class.Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,13 @@ public function equals(core_kernel_classes_Resource $resource): bool
*/
public function isInstanceOf(core_kernel_classes_Class $class): bool
{
return in_array($class->getUri(), $this->getParentClassesIds(), true);
foreach ($this->getTypes() as $type) {
if ($class->equals($type) || $type->isSubClassOf($class)) {
return true;
}
}

return false;
}

public function getRootId(): string
Expand Down

0 comments on commit 52391ee

Please sign in to comment.