Ever since I upgraded to 2.6.1, Akismet has been broken. Attempting to delete all gets me this:
Warning: Invalid argument supplied for foreach() in public_html/wp/wp-content/plugins/akismet/akismet.php on line 731
Warning: Cannot modify header information - headers already sent by (output started at public_html/wp/wp-content/plugins/akismet/akismet.php:731) in /home/patterico/public_html/wp/wp-includes/pluggable.php on line 770
I checked the source code out. It reads like so:
$moderation = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = '0'", ARRAY_A );
foreach ( $moderation as $c ) {
I tried some database queries:
mysql> select count(*) from wp_comments where comment_approved ='0';
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from wp_comments where comment_approved =0;
+----------+
| count(*) |
+----------+
| 162 |
+----------+
1 row in set (0.19 sec)
So I guess somehow WordPress is setting comment_approved to a numeric 0, but it should be a string, '0', according to Akismet?