Title: PHP Warning: in_array() expects parameter 2 to be array
Last modified: June 24, 2022

---

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

 *  Resolved [neosan](https://wordpress.org/support/users/nreljed/)
 * (@nreljed)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/)
 * hello ,
    I did a clean install of wordpress 6.0. I installed your plugin I went
   to create my pages home contact about etc… each time I click on “Add New” (pages)
   an error [appears](https://ibb.co/YXKg5Ry) and disappears and I can continue 
   to create my page.. and so on
 * in console php_errors.log i captured the errors
    I hope it’s nothing serious 
   like a flaw or something else it’s scary I hope an update will fix it
 *     ```
       [24-Jun-2022 12:21:26 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in C:\laragon\www\beta\wp-content\plugins\required-taxonomies\index.php on line 100
       [24-Jun-2022 12:21:44 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in C:\laragon\www\beta\wp-content\plugins\required-taxonomies\index.php on line 100
       [24-Jun-2022 12:21:50 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in C:\laragon\www\beta\wp-content\plugins\required-taxonomies\index.php on line 100
       [24-Jun-2022 12:22:02 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in C:\laragon\www\beta\wp-content\plugins\required-taxonomies\index.php on line 100
       [24-Jun-2022 12:22:06 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in C:\laragon\www\beta\wp-content\plugins\required-taxonomies\index.php on line 100
       [24-Jun-2022 12:22:18 UTC] PHP Warning:  in_array() expects parameter 2 to be array, null given in C:\laragon\www\beta\wp-content\plugins\required-taxonomies\index.php on line 100
       ```
   

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

 *  Plugin Author [Jose Vega](https://wordpress.org/support/users/josevega/)
 * (@josevega)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/#post-15787093)
 * Hi.
 * The issue has been fixed in the update released today.
 *  Thread Starter [neosan](https://wordpress.org/support/users/nreljed/)
 * (@nreljed)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/#post-15806552)
 * thank you for your reactivity problem solved
 *  [inMountains](https://wordpress.org/support/users/lawdreen/)
 * (@lawdreen)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/#post-16038185)
 * I have the same problem this evening, when I have been playing with the plugin
   called Code Snippets. Up to Sep.23, I have updated WordPress to 6.0.2, the problem
   is still there.
    I also use Woody Snippets, there were no problem.
 *  Plugin Author [Jose Vega](https://wordpress.org/support/users/josevega/)
 * (@josevega)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/#post-16038895)
 * Hi there.
 * Can you paste the full error message?
    The specific error that was originally
   reported was fixed in a previous update, so this must be a new error and I need
   to see the full message to know where/why it’s happening.
 *  [inMountains](https://wordpress.org/support/users/lawdreen/)
 * (@lawdreen)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/#post-16041291)
 * I commented(? hope it is the right word) the code lines (295…) for two days. 
   Just now, I just uncommented to hopefully get the error message to show you, 
   but it is now gone. The page words fine.
    I didn’t uninstall any plugins.
 *  [inMountains](https://wordpress.org/support/users/lawdreen/)
 * (@lawdreen)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/#post-16041295)
 * Sorry, I didn’t install your plugin. It must be related to other plugins, probably
   Code Snippets.

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/required-taxonomies.svg)
 * [WP Required Taxonomies - Categories and Tags Mandatory](https://wordpress.org/plugins/required-taxonomies/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/required-taxonomies/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/required-taxonomies/)
 * [Active Topics](https://wordpress.org/support/plugin/required-taxonomies/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/required-taxonomies/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/required-taxonomies/reviews/)

## Tags

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

 * 6 replies
 * 3 participants
 * Last reply from: [inMountains](https://wordpress.org/support/users/lawdreen/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-4/#post-16041295)
 * Status: resolved