From 9dc6e8a5fa102be8a77128dbfd89a707297545f8 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 15 Nov 2001 21:38:09 +0000 Subject: Got a bad piece of tape that time, fell on the carpet, euuggh, this one should work git-svn-id: file:///svn/phpbb/trunk@1325 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index f3bf7052a9..4a9281a6c1 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -303,12 +303,15 @@ function remove_old_words($post_id) } } - $sql = "DELETE FROM " . SEARCH_WORD_TABLE . " - WHERE word_id IN ($word_id_sql)"; - $result = $db->sql_query($sql); - if( !$result ) + if( $word_id_sql ) { - message_die(GENERAL_ERROR, "Couldn't delete word list entry", "", __LINE__, __FILE__, $sql); + $sql = "DELETE FROM " . SEARCH_WORD_TABLE . " + WHERE word_id IN ($word_id_sql)"; + $result = $db->sql_query($sql); + if( !$result ) + { + message_die(GENERAL_ERROR, "Couldn't delete word list entry", "", __LINE__, __FILE__, $sql); + } } } -- cgit v1.2.1