From 5b0641523593e5e60397dc355ff42cbf3ac74cca Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 3 Dec 2021 13:58:14 +0100 Subject: [PATCH] errata fix --- pandora_console/include/functions_db.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index a60dc87b02..34bb53ef26 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -1822,6 +1822,7 @@ function db_process_sql_delete($table, $where, $where_join='AND') function db_process_sql_begin() { global $config; + $null = null; switch ($config['dbtype']) { case 'postgresql': @@ -1832,8 +1833,8 @@ function db_process_sql_begin() default: case 'mysql': - db_process_sql('SET AUTOCOMMIT = 0', 'affected_rows', '', false, null, false); - db_process_sql('START TRANSACTION', 'affected_rows', '', false, null, false); + db_process_sql('SET AUTOCOMMIT = 0', 'affected_rows', '', false, $null, false); + db_process_sql('START TRANSACTION', 'affected_rows', '', false, $null, false); break; } } @@ -1845,6 +1846,7 @@ function db_process_sql_begin() function db_process_sql_commit() { global $config; + $null = null; switch ($config['dbtype']) { case 'postgresql': @@ -1855,8 +1857,8 @@ function db_process_sql_commit() default: case 'mysql': - db_process_sql('COMMIT', 'affected_rows', '', false, null, false); - db_process_sql('SET AUTOCOMMIT = 1', 'affected_rows', '', false, null, false); + db_process_sql('COMMIT', 'affected_rows', '', false, $null, false); + db_process_sql('SET AUTOCOMMIT = 1', 'affected_rows', '', false, $null, false); break; } } @@ -1868,6 +1870,7 @@ function db_process_sql_commit() function db_process_sql_rollback() { global $config; + $null = null; switch ($config['dbtype']) { case 'postgresql': @@ -1878,8 +1881,8 @@ function db_process_sql_rollback() default: case 'mysql': - db_process_sql('ROLLBACK', 'affected_rows', '', false, null, false); - db_process_sql('SET AUTOCOMMIT = 1', 'affected_rows', '', false, null, false); + db_process_sql('ROLLBACK', 'affected_rows', '', false, $null, false); + db_process_sql('SET AUTOCOMMIT = 1', 'affected_rows', '', false, $null, false); break; } }