Skip to content

Commit

Permalink
Merge pull request #117 from MindaugasR/fix_116
Browse files Browse the repository at this point in the history
fixed undefined index error, when child document class has no annotations
  • Loading branch information
Martynas Sudintas committed Jan 12, 2015
2 parents 15dc594 + 92c2600 commit 7ed7ffc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Mapping/MetadataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ private function getSettersAndGetters(\ReflectionClass $reflectionClass, array $
$getters = [];

foreach ($properties as $property => $params) {
if (array_key_exists($property, $this->aliases[$reflectionClass->getName()])) {
if (isset($this->aliases[$reflectionClass->getName()]) &&
array_key_exists($property, $this->aliases[$reflectionClass->getName()])
) {
list($setters[$property], $getters[$property]) = $this
->getInfoAboutProperty(
$params,
Expand Down

0 comments on commit 7ed7ffc

Please sign in to comment.