From b7cf3a5c65455e58ff67d3114a31af7d7845cd66 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 1 Oct 2006 07:27:28 +0000 Subject: [PATCH] r1224: SQL errors-- --- docs/changes.txt | 1 + newreport.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 1cc9a9c..3280179 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -4,6 +4,7 @@ - Renamed "automatic action" to "automation" - If no user comment is entered but there's an automation comment, then the automation comment is no longer disregarded - Get rid of a foreach() warning if there are no products [admin/product.php#317] +- If no custom fields were setup, an empty query error would be thrown [newreport.php:130] 1.1.0 Release Candidate 1 =============================== diff --git a/newreport.php b/newreport.php index 142f803..f9ef722 100755 --- a/newreport.php +++ b/newreport.php @@ -127,7 +127,10 @@ if ($_POST['do'] == 'insert') $bug->set('hiddenlastpostbyname', $bugsys->userinfo['displayname']); $bug->update(); - $db->query(sprintf($cfields, $comment->values['bugid'])); + if ($cfields) + { + $db->query(sprintf($cfields, $comment->values['bugid'])); + } $notif->set_bug_data($bug->objdata); -- 2.43.5