From 7e916cebd57e96bb6caa2e29b8e643aca5c58f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Cesar=20Laura=20Avenda=C3=B1o?= Date: Fri, 12 Jun 2020 22:17:42 +0000 Subject: [PATCH] PMCORE-1644 --- workflow/engine/classes/class.pmFunctions.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index 149c9d85b..74570f924 100644 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -249,15 +249,16 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter if (is_null(config('database.connections.' . $DBConnectionUID . '.driver'))) { // Force to load the external connections DbConnections::loadAdditionalConnections(); - if (config('database.connections.' . $DBConnectionUID . '.driver') !== 'oracle') { - // If the connections drivers are "mysql", "pgsql" or "sqlsrv" we're using Laravel - $con = DB::connection($DBConnectionUID); - $con->beginTransaction(); - } else { - // If the connection driver is "oracle" we're using the native oci8 functions - $con = Propel::getConnection($DBConnectionUID); - $con->begin(); - } + } + + if (config('database.connections.' . $DBConnectionUID . '.driver') !== 'oracle') { + // If the connections drivers are "mysql", "pgsql" or "sqlsrv" we're using Laravel + $con = DB::connection($DBConnectionUID); + $con->beginTransaction(); + } else { + // If the connection driver is "oracle" we are using the native oci8 functions + $con = Propel::getConnection($DBConnectionUID); + $con->begin(); } $blackList = System::getQueryBlackList();