From 2bab7e26931d67ed4d63cdbd299b85a05d359813 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 13 Apr 2023 18:51:13 +0200 Subject: prevent duplicate definitions --- include/dba/dba_driver.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index 152be7f88..631513819 100644 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -67,9 +67,17 @@ class DBA { require_once('include/dba/dba_pdo.php'); self::$dba = new dba_pdo($server,self::$scheme,$port,$user,$pass,$db,$db_charset,$install); - define('NULL_DATE', self::$null_date); - define('ACTIVE_DBTYPE', self::$dbtype); - define('TQUOT', self::$tquot); + if (!defined('NULL_DATE')) { + define('NULL_DATE', self::$null_date); + } + + if (!defined('ACTIVE_DBTYPE')) { + define('ACTIVE_DBTYPE', self::$dbtype); + } + + if (!defined('TQUOT')) { + define('TQUOT', self::$tquot); + } return self::$dba; } -- cgit v1.2.3