Title: polylang : Warning: in_array() expects parameter 2 to be array
Last modified: August 20, 2016

---

# polylang : Warning: in_array() expects parameter 2 to be array

 *  Resolved [marie_mada](https://wordpress.org/support/users/marie_mada/)
 * (@marie_mada)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/polylang-warning-in_array-expects-parameter-2-to-be-array/)
 * Hello
 * I try to use the plugin but i have the message:
    ‘Warning: in_array() expects
   parameter 2 to be array, null given in /’
 * I saw 8 month ago that i can install hotfix : but it doesnt fix the problem.
   
   I can’t use it with WP3.4. ?
 * thank’s
    Marie
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/polylang-warning-in_array-expects-parameter-2-to-be-array/#post-2940527)
 * I guess the problem is this one:
    [http://wordpress.org/support/topic/plugin-polylang-error-output-before-and-headers-already-sent-error?replies=14](http://wordpress.org/support/topic/plugin-polylang-error-output-before-and-headers-already-sent-error?replies=14)
 *  [Siroj](https://wordpress.org/support/users/siroj/)
 * (@siroj)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/polylang-warning-in_array-expects-parameter-2-to-be-array/#post-2940528)
 * I have the same error.
 * This is the line of code:
 *     ```
       $is_post_type = isset($qvars['post_type']) && (in_array($qvars['post_type'], $this->post_types) ||
       			 (is_array($qvars['post_type']) && array_intersect($qvars['post_type'], $this->post_types)) );
       ```
   
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/polylang-warning-in_array-expects-parameter-2-to-be-array/#post-2940530)
 * Yes. See link above for a quick fix before I release a new version.
 *  [Siroj](https://wordpress.org/support/users/siroj/)
 * (@siroj)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/polylang-warning-in_array-expects-parameter-2-to-be-array/#post-2940533)
 * Thanks for your quick response… That worked like a charm!
 *  Thread Starter [marie_mada](https://wordpress.org/support/users/marie_mada/)
 * (@marie_mada)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/polylang-warning-in_array-expects-parameter-2-to-be-array/#post-2940589)
 * THANKS you re so fast 🙂

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

The topic ‘polylang : Warning: in_array() expects parameter 2 to be array’ is closed
to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [in_array](https://wordpress.org/support/topic-tag/in_array/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 5 replies
 * 3 participants
 * Last reply from: [marie_mada](https://wordpress.org/support/users/marie_mada/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/polylang-warning-in_array-expects-parameter-2-to-be-array/#post-2940589)
 * Status: resolved