Just as the title says, this error pops up:

* warning: array_filter(): The first argument should be an array in /Users/edmund/Documents/htdocs/cvs/drupal/modules/comment/comment.module on line 1123.
* warning: Invalid argument supplied for foreach() in /Users/edmund/Documents/htdocs/cvs/drupal/modules/comment/comment.module on line 1123.

Patch checks to see if $edit['comments'] is set and redirects user accordingly.

Comments

flk’s picture

StatusFileSize
new818 bytes

the error seems to occur only when trying to delete a comment....on 'unplish the selected comment' no error occurs.
I have rerolled it against ahead...it does what it says, but on todays head multi-comment delete seems to be broken b0rked.

edmund.kwok’s picture

Yeah, forgot to mention that it only happens with delete comments and not unpublished. Checking if comments were selected is done in comment_admin_overview_validate. But when deleting comments, the comment_multiple_delete_confirm() form is returned instead. Thus comment_admin_overview_validate is not called and hence the error.

Patch was already rolled againts head. The multi-comments delete issue is reported in http://drupal.org/node/82940.

edmund.kwok’s picture

StatusFileSize
new836 bytes

Issue still applies to HEAD. Rerolling patch, and removed some whitespace.

Kjartan’s picture

StatusFileSize
new695 bytes

I looked at how node.module did this check and replicated it in comment.module.

edmund.kwok’s picture

Status: Needs review » Reviewed & tested by the community

Tested on fresh HEAD, much cleaner approach :)

I'd say RTBC since it's a breaks the comment page somewhat but with an easy fix.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)