Allow SQL_DEBUG to be undefined

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@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Dan McGee 2011-07-28 13:59:06 -05:00 committed by Lukas Fleischer
parent 1e20af9aed
commit 1f79258e81

View file

@ -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");
}