From de76531589fd2b5e369e06d2ec3cf254083e1f41 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Wed, 1 May 2024 23:41:42 -0500 Subject: [PATCH] Better type check in DbConnection --- lib/DbConnection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DbConnection.php b/lib/DbConnection.php index 6583efbc..d46a163e 100644 --- a/lib/DbConnection.php +++ b/lib/DbConnection.php @@ -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){