From 3697e8b9c410a8bd3300bbc09441d07d5b8619b6 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 19 Jul 2006 17:18:16 +0000 Subject: [PATCH] Swap error logging and addmsg() calls as addmsg() performs a database transaction and will clear out any error that we wanted to report when error logging and calling mysql_error() --- include/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/query.php b/include/query.php index 840884b..e45f15e 100644 --- a/include/query.php +++ b/include/query.php @@ -113,10 +113,10 @@ function query_bugzilladb($sQuery,$sComment="") function query_error($sQuery, $sComment="") { + error_log::log_error(ERROR_SQL, "Query: '".$sQuery."' mysql_error(): '".mysql_error()."' comment: '".$sComment."'"); + $sStatusMessage = "

An internal error has occurred and has been logged and reported to appdb admins

"; addmsg($sStatusMessage); - - error_log::log_error(ERROR_SQL, "Query: '".$sQuery."' mysql_error(): '".mysql_error()."' comment: '".$sComment."'"); } ?>