Forum module borked
Dave Reid - October 24, 2009 - 04:09
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | forum.module |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | Needs tests |
Description
Fatal errors, fatal errors everywhere!

#1
#4
Prior to this patch upon replying to a forum post I was getting the following error
Recoverable fatal error: Argument 4 passed to db_query_range() must be an array, integer given, called in /var/www/html/chris/drupal-7/modules/forum/forum.module on line 1113 and defined in db_query_range() (line 1897 of /var/www/html/chris/drupal-7/includes/database/database.inc).After applying the patch the error is gone and I can successfully reply to a forum post. Did this error occur elsewhere and is further testing needed?
#5
Tested.
Me too. Before I applied the patch, I got same error as chrisred when trying to reply with a comment on a forum topic.
Applied the patch and it works! Well done Dave Reid :)
#6
This gets a pass from me too. Fixes a misconstructed db_query_range() call. RTBC.
#7
Sorry for the error, that was me...
Let's extend the code coverage a little bit.
#8
Do you have a suggestion for the added test coverage? Adding a comment with forum module enabled might be enough. If not, let's just fix this critical error asap and come back to it.
#9
Agree with @pwolanin - I'm sure I've seen Dries commit a few crucial patches to HEAD and then mark the issue as "Needs Tests".
#10
Added one additional bugfix and tests for 1) adding comment to forum topic and 2) editing forum topic that has a comment.
#11
Confirmed that this is a bug, and that the patch solves it. Committed.
#12
Automatically closed -- issue fixed for 2 weeks with no activity.