Skip to content

Commit

Permalink
Do not consider an entity as audited if its parent is (fix #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper committed Jan 24, 2019
1 parent 1076d47 commit c839ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DoctrineAuditBundle/AuditConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function isAudited($entity): bool
if (isset($entityOptions['enabled']) && !$entityOptions['enabled']) {
continue;
}
if (\is_object($entity) && $entity instanceof $auditedEntity) {
if (\is_object($entity) && $entity instanceof $auditedEntity && !is_subclass_of($entity, $auditedEntity)) {
return true;
}
if (\is_string($entity) && $entity === $auditedEntity) {
Expand Down

0 comments on commit c839ee8

Please sign in to comment.