Better type check in DbConnection

This commit is contained in:
Alex Cabal 2024-05-01 23:41:42 -05:00
parent 82fe64c368
commit de76531589

View file

@ -215,7 +215,7 @@ class DbConnection{
// Note: Using ReflectionProperty in this way is pretty slow. Maybe we'll think of a
// better way to automatically fill enum types later.
try{
$rp = new ReflectionProperty($object, $metadata[$i]['name']);
$rp = new ReflectionProperty($class, $metadata[$i]['name']);
/** @var ?ReflectionNamedType $property */
$property = $rp->getType();
if($property !== null){