From f4cbd8b24f6c0befe8cf63a1bc8abe1d66fda700 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 21 Mar 2010 02:17:16 +0000 Subject: [PATCH] AHA! This bug took ages to track down, as the trigger was in a completely different system to the error message... Many, many thanks to zshall for managing to reproduce the error, then narrowing it down to a single line \o/ --- core/util.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index b7009847..f1315cae 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -323,7 +323,13 @@ function _count_execs($db, $sql, $inputarray) { fclose($fp); } else { - log_error("core", "failed to open sql.log for appending"); + # WARNING: + # SQL queries happen before the event system is fully initialised + # (eg, "select theme from config" happens before "load themes"), + # so using the event system to report an error will create some + # really weird looking bugs. + # + #log_error("core", "failed to open sql.log for appending"); } } if (!is_array($inputarray)) $_execs++;