From 13d5ba8bbaa4088e0664aefd09bb0c05c0649ac2 Mon Sep 17 00:00:00 2001
From: Prasad <prasad@vtiger.com>
Date: Mon, 23 Aug 2021 18:52:12 +0530
Subject: [PATCH] Fixes #1646: property instance initialization

---
 libraries/log4php/LoggerPropertyConfigurator.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libraries/log4php/LoggerPropertyConfigurator.php b/libraries/log4php/LoggerPropertyConfigurator.php
index 9d79bd989..8969499ad 100644
--- a/libraries/log4php/LoggerPropertyConfigurator.php
+++ b/libraries/log4php/LoggerPropertyConfigurator.php
@@ -14,7 +14,6 @@ class LoggerPropertyConfigurator {
 	static $singleton = false;
 	
 	function __construct() {
-		LoggerPropertyConfigurator::$singleton = $this;
 	}
 	
 	function configure($configfile) {
@@ -59,6 +58,7 @@ class LoggerPropertyConfigurator {
 	}
 	
 	static function getInstance() {
+		if (!self::$singleton) self::$singleton = new static();
 		return self::$singleton;
 	}
 }
-- 
GitLab