From 4dda06bc5f9eafd51d0e8f7145f977fe76d5b99c Mon Sep 17 00:00:00 2001 From: Sieciech Date: Fri, 26 Feb 2021 22:10:22 +0100 Subject: [PATCH] hcvb --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index e1cd0cf..b2a88ae 100644 --- a/index.php +++ b/index.php @@ -15,7 +15,7 @@ abstract class BaseModel { } public static function Get(int $id) { - return get_class($this); + return get_called_class(); $stmt = $pdo->prepare('SELECT id, name FROM users WHERE id=?'); $stmt->execute([$id]); return $stmt->fetchObject(__CLASS__);