Title: Need correct hook before comment post
Last modified: August 19, 2016

---

# Need correct hook before comment post

 *  [pekeltje](https://wordpress.org/support/users/pekeltje/)
 * (@pekeltje)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/need-correct-hook-before-comment-post/)
 * Hello,
 * I created some time ago (when i was making a wordpress site for some friends)
   a anti-spam plugin called spam-free
 * You can find it here:
    [http://wordpress.org/extend/plugins/spam-free/](http://wordpress.org/extend/plugins/spam-free/)
 * I never use it anymore and i hear (And tested few minutes ago) and it doesnt 
   work anymore in 3.0.1
 * The error:
    `Warning: array_merge() [function.array-merge]: Argument #2 is not
   an array in /public/sites/wordpress.jordykroeze.com/wp-includes/classes.php on
   line 324`
 * The error is created by the hook that activate the anti spam check:
    `add_action('
   nocache_headers', 'antispamcheck');`
 * But since i dont use wordpress anymore and im not following the changes i dont
   know anymore how to fix this problem.
 * Can someone help me?
 * Thanks,
    Jordy Kroeze

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [pekeltje](https://wordpress.org/support/users/pekeltje/)
 * (@pekeltje)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/need-correct-hook-before-comment-post/#post-1626533)
 * Someone?
 *  Thread Starter [pekeltje](https://wordpress.org/support/users/pekeltje/)
 * (@pekeltje)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/need-correct-hook-before-comment-post/#post-1626565)
 * Does someone know the answer?
 *  Thread Starter [pekeltje](https://wordpress.org/support/users/pekeltje/)
 * (@pekeltje)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/need-correct-hook-before-comment-post/#post-1626582)
 * Does someone know the answer?
 *  Moderator [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * (@sergeybiryukov)
 * WordPress Dev
 * [14 years, 10 months ago](https://wordpress.org/support/topic/need-correct-hook-before-comment-post/#post-1626673)
 * `nocache_headers` is a filter, not an action. It expects you to return an array
   in the hooked function.
 * If you need to stop execution early, you can use `plugins_loaded` action:
    [http://codex.wordpress.org/Plugin_API/Action_Reference](http://codex.wordpress.org/Plugin_API/Action_Reference)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Need correct hook before comment post’ is closed to new replies.

## Tags

 * [add_action](https://wordpress.org/support/topic-tag/add_action/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * 4 replies
 * 2 participants
 * Last reply from: [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/need-correct-hook-before-comment-post/#post-1626673)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
