Title: Bug Report &#8211; Warning: in_array() expects parameter 2 to be array:
Last modified: July 13, 2017

---

# Bug Report – Warning: in_array() expects parameter 2 to be array:

 *  Resolved [michent1](https://wordpress.org/support/users/michent1/)
 * (@michent1)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/bug-report-warning-in_array-expects-parameter-2-to-be-array/)
 * Getting an error when an existing post type is mapped but saved with out any 
   of the fields added. This breaks the field select functionality, requiring the
   post mapping to be deleted & recreated:
 * `Warning: in_array() expects parameter 2 to be array, null given in \wp-content\
   plugins\post-my-contact-form-7\includes\class-cf7-2-post-factory.php on line 
   704`
 * xdebug stacktrace Screenshot: [https://www.dropbox.com/s/xnglx33zv0gewkb/post-my-cf7-error.png?dl=0](https://www.dropbox.com/s/xnglx33zv0gewkb/post-my-cf7-error.png?dl=0)

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

 *  [Levdbas](https://wordpress.org/support/users/levdbas/)
 * (@levdbas)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/bug-report-warning-in_array-expects-parameter-2-to-be-array/#post-9345810)
 * Got the same issues as you [@michent1](https://wordpress.org/support/users/michent1/)
 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/bug-report-warning-in_array-expects-parameter-2-to-be-array/#post-9380661)
 * Hi [@michent1](https://wordpress.org/support/users/michent1/),
 * thanks for reporting this error, much appreciated, however could you tell me 
   what you mean by ‘saved with out any of the fields added’, do you mean custom
   meta-fields?
 * > This breaks the field select functionality, requiring the post mapping to be
   > deleted & recreated
 * Did you try to set the status of the mapping back to draft (read the [2nd but last FAQ](https://wordpress.org/plugins/post-my-contact-form-7/#faq-header))
   instead of deleting/recreating it?
 *  Plugin Author [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/bug-report-warning-in_array-expects-parameter-2-to-be-array/#post-9382152)
 * fixed in v2.0.1

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

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

 * ![](https://ps.w.org/post-my-contact-form-7/assets/icon-256x256.png?rev=1985682)
 * [Post My CF7 Form](https://wordpress.org/plugins/post-my-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-my-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-my-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/post-my-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-my-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-my-contact-form-7/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/bug-report-warning-in_array-expects-parameter-2-to-be-array/#post-9382152)
 * Status: resolved