Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz authored Jul 3, 2020
1 parent 5c64da6 commit 04e945d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Accessor/DefaultAccessorStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public function getValue(object $object, PropertyMetadata $metadata, Serializati
};
} else {
$this->readAccessors[$metadata->class] = \Closure::bind(static function ($o, $name) {
return $o->$name;
$ref = new \ReflectionProperty($o, $name);
return $prop->isStatic() ? $o::$name : $o->$name;
}, null, $metadata->class);
}
}
Expand Down

0 comments on commit 04e945d

Please sign in to comment.