New reasons cannot be added
ddyrr - July 12, 2008 - 05:12
| Project: | abuse |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Every time I try to add a new reason, I get the following error:
user warning: Column count doesn't match value count at row 1 query: INSERT INTO abuse_reasons (reason, description, argumentation) VALUES ('reason', 'description', 'email notice', 0) in /sites/all/modules/abuse/abuse.admin.inc on line 268.

#1
It is caused by an extra %d on line 267.
Original:
<?phpdb_query("INSERT INTO {abuse_reasons} (reason, description, argumentation) VALUES ('%s', '%s', '%s', %d)",
$values['short_form'], $values['description'], $values['email_notice']);
?>
Just change that line to this:
<?phpdb_query("INSERT INTO {abuse_reasons} (reason, description, argumentation) VALUES ('%s', '%s', '%s')",
$values['short_form'], $values['description'], $values['email_notice']);
?>
#2
Thanks, works perfectly!!!
#3
I've added this patch into the latest release (should be up by tomorrow). Thanks!