diff options
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 13 |
1 files 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); + } } } |