I got an E_NOTICE today and looked into it. The patch fixes the notice which happens when you go to the Comments area and then click on the Approval Queue tab. It happens each time I click on the tab. The fact is that $form_state['post'] exists, but the $form_state['post']['comments'] is not defined at that point.

Now, looking at the logic, I'm wondering whether that test shouldn't actually be inside the previous if() block.

The logic goes something like this:

o If there are comments that can be marked for spam or not, add spam actions
o If there are comments listed, act on them

How can there be comments to act on if there isn't any spam actions available? Can that really happen? If yes, then it's certainly correct. Otherwise, the 2nd if() should go inside the first.

Thank you.
Alexis

CommentFileSizeAuthor
spam-6.x-comment_enotice.patch691 bytesAlexisWilke
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AlexisWilke’s picture

Status: Active » Closed (works as designed)

The if()'s are correct. The first part is to create the form drop-down and we want it exactly where it is.

Thank you.
Alexis Wilke