[aur-dev] [PATCH 2/3] Allow SQL_DEBUG to be undefined

Dan McGee dan at archlinux.org
Thu Jul 28 14:59:06 EDT 2011


We shouldn't require this as it is a new config parameter and it causes
PHP warnings to be spewed everywhere.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 web/lib/aur.inc.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 00a8c8c..55cc8a9 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -235,7 +235,7 @@ function db_query($query="", $db_handle="") {
 		die("DB handle was not provided to db_query");
 	}
 
-	if (SQL_DEBUG == 1) {
+	if (defined('SQL_DEBUG') && SQL_DEBUG == 1) {
 		$bt = debug_backtrace();
 		error_log("DEBUG: ".$bt[0]['file'].":".$bt[0]['line']." query: $query\n");
 	}
-- 
1.7.6



More information about the aur-dev mailing list