From 6326df27411a481ab0a9a00968fade3036cda8c8 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Fri, 28 Jun 2024 11:30:18 +0800 Subject: [PATCH] * [task#121999] Use "static" keyword instead of "self". --- framework/base/router.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index a804abf700..8d66e9f031 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -478,7 +478,7 @@ class baseRouter if($this->config->framework->autoConnectDB) $this->connectDB(); - if($this->config->redis) $this->redis = self::connectToRedis(); + if($this->config->redis) $this->redis = static::connectToRedis(); $this->setupProfiling(); $this->setupXhprof(); @@ -3480,7 +3480,7 @@ class baseRouter * @link https://github.com/phpredis/phpredis/ * @return Redis|object|false */ - public function connectToRedis() + static public function connectToRedis() { if(!extension_loaded('redis')) return false;