Skip to content

Commit

Permalink
Get real class name for proxy objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper committed Jan 29, 2018
1 parent 4abe9c9 commit 06cca9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DoctrineAuditBundle/AuditConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function isAudited($entity): bool
public function isAuditedField($entity, $field): bool
{
if (!in_array($field, $this->ignoredColumns) && $this->isAudited($entity)) {
$class = is_object($entity) ? get_class($entity) : $entity;
$class = is_object($entity) ? \Doctrine\Common\Util\ClassUtils::getRealClass(get_class($entity)) : $entity;
$entityOptions = $this->entities[$class];

return !isset($entityOptions['ignored_columns']) || !in_array($field, $entityOptions['ignored_columns']);
Expand Down Expand Up @@ -120,7 +120,7 @@ public function getTableSuffix(): string
/**
* Get the value of excludedColumns.
*
* @return string
* @return array
*/
public function getIgnoredColumns(): array
{
Expand Down

0 comments on commit 06cca9a

Please sign in to comment.