Title: PHP Warning: in_array() expects parameter 2 to be array, null given in importer
Last modified: February 14, 2020

---

# PHP Warning: in_array() expects parameter 2 to be array, null given in importer

 *  Resolved [llgreg](https://wordpress.org/support/users/llgreg/)
 * (@llgreg)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-null-given-in-importer/)
 * Getting the following PHP warning
 * PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-content/
   plugins/import-users-from-csv-with-meta/importer.php on line 425
 * Is it possible to change line 425 to
 * elseif( **is_array($wp_users_fields) && ** in_array( $headers[ $i ], $wp_users_fields)){//
   wp_user data

Viewing 1 replies (of 1 total)

 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-null-given-in-importer/#post-12439357)
 * [@llgreg](https://wordpress.org/support/users/llgreg/),
 * Sorry this is not a solution because there was a problem.
 * $wp_users_fields has to be an array and not a null.
 * I have just fixed it.
 * Please update and thanks for reporting it 🙂

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/import-users-from-csv-with-meta/assets/icon-256x256.png?
   rev=1174343)
 * [Import and export users and customers](https://wordpress.org/plugins/import-users-from-csv-with-meta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-users-from-csv-with-meta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/)
 * [Active Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/php-warning-in_array-expects-parameter-2-to-be-array-null-given-in-importer/#post-12439357)
 * Status: resolved