On Fri, Jul 29, 2011 at 2:26 PM, Lukas Fleischer <[email protected]> wrote: > On Thu, Jul 28, 2011 at 01:59:06PM -0500, Dan McGee wrote: >> We shouldn't require this as it is a new config parameter and it causes >> PHP warnings to be spewed everywhere. > > Well, "UPGRADING" tells you to merge "web/lib/config.inc.php.proto" with > "web/lib/config.inc.php", so you should never see those warnings unless > you run a snapshot/Git checkout and forgot to add this.
I tend to not read UPGRADING carefully when trying to debug production AUR, that's all. While I agree it is the prudent thing to do, I wouldn't have expected a patch like this to require changing my config if I didn't want debug, that's all. > Anyway, this additional check makes our code cleaner and the patch is > simple enough to not require any discussion. I'll apply this as-is. Thanks! >> >> Signed-off-by: Dan McGee <[email protected]> >> --- >> 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 >
