From 453e815224c60b5032799be0c5648efde15618e1 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@enhancesoft.com> Date: Tue, 16 Apr 2019 18:04:17 +0000 Subject: [PATCH] Lazy load $ost Config --- include/class.osticket.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/class.osticket.php b/include/class.osticket.php index a8133f159..b53e849f4 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -59,7 +59,6 @@ class osTicket { if (!defined('DISABLE_SESSION') || !DISABLE_SESSION) $this->session = osTicketSession::start(SESSION_TTL); // start DB based session - $this->config = new OsticketConfig(); $this->csrf = new CSRF('__CSRFToken__'); @@ -85,6 +84,9 @@ class osTicket { } function getConfig() { + if (!isset($this->config)) + $this->config = new OsticketConfig(); + return $this->config; } -- GitLab