From 52d3b1d59e0d1e3155e696a5647690ebe9e190d0 Mon Sep 17 00:00:00 2001 From: Jason Coward Date: Thu, 16 May 2024 08:41:57 -0600 Subject: [PATCH] Make modX::getInstance() work with derivative classes --- core/src/Revolution/modX.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/Revolution/modX.php b/core/src/Revolution/modX.php index 08af9fd04ea..d6aacdb0ceb 100644 --- a/core/src/Revolution/modX.php +++ b/core/src/Revolution/modX.php @@ -403,11 +403,11 @@ public static function toQueryString(array $parameters = [], $numPrefix = '', $a * @param array|null $config An optional array of config data for the instance. * @param bool $forceNew If true a new instance will be created even if an instance * with the provided $id already exists in modX::$instances. - * @return modX An instance of modX. + * @return static An instance of modX. * @throws xPDOException */ public static function getInstance($id = null, $config = null, $forceNew = false) { - $class = __CLASS__; + $class = static::class; if (is_null($id)) { if (!is_null($config) || $forceNew || empty(self::$instances)) { $id = uniqid($class);