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 052b011
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 $ref->isStatic() ? $o::$name : $o->$name;
}, null, $metadata->class);
}
}
Expand Down

0 comments on commit 052b011

Please sign in to comment.