Title: It doesn&#039;t work: Warning: in_array() expects parameter 2 to be array
Last modified: August 30, 2016

---

# It doesn't work: Warning: in_array() expects parameter 2 to be array

 *  [ciscothehellspawn](https://wordpress.org/support/users/ciscothehellspawn/)
 * (@ciscothehellspawn)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/it-doesnt-work-warning-in_array-expects-parameter-2-to-be-array/)
 * Any help on how to fix it?
    thanks
 * `Warning: in_array() expects parameter 2 to be array, null given in /web/htdocs/
   www.informatica37.it/home/wp-content/plugins/automatically-paginate-posts/automatically-
   paginate-posts.php on line 361`
 * [https://wordpress.org/plugins/automatically-paginate-posts/](https://wordpress.org/plugins/automatically-paginate-posts/)

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

 *  [colmar](https://wordpress.org/support/users/colmar/)
 * (@colmar)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/it-doesnt-work-warning-in_array-expects-parameter-2-to-be-array/#post-6263142)
 * Getting the same error message, how to fix please?
 *  [mateen619](https://wordpress.org/support/users/mateen619/)
 * (@mateen619)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/it-doesnt-work-warning-in_array-expects-parameter-2-to-be-array/#post-6263162)
 * replace this code in line 361
 * `if (in_array( $the_post->post_type, $this->post_types ) && ! preg_match( ........`
 * with this
 * `if (is_array ($this->post_types) && in_array( $the_post->post_type, $this->post_types)&&!
   preg_match( ........`
 * In this new code we are just checking that the 2nd parameter is array.

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

The topic ‘It doesn't work: Warning: in_array() expects parameter 2 to be array’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/automatically-paginate-posts.svg)
 * [Automatically Paginate Posts](https://wordpress.org/plugins/automatically-paginate-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/automatically-paginate-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/automatically-paginate-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/automatically-paginate-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/automatically-paginate-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/automatically-paginate-posts/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [mateen619](https://wordpress.org/support/users/mateen619/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/it-doesnt-work-warning-in_array-expects-parameter-2-to-be-array/#post-6263162)
 * Status: not resolved