Skip to content

Commit

Permalink
Revert ReflectionEnumProperty change
Browse files Browse the repository at this point in the history
  • Loading branch information
IonBazan committed Feb 22, 2022
1 parent 0184214 commit 8fb701f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Doctrine/ODM/MongoDB/Mapping/ReflectionEnumProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ public function getValue($object = null)
return null;
}

return $this->originalReflectionProperty->getValue($object)->value;
$enum = $this->originalReflectionProperty->getValue($object);

if ($enum === null) {
return null;
}

return $enum->value;
}

/**
Expand Down

0 comments on commit 8fb701f

Please sign in to comment.