Title: Warning: in_array() expects parameter 2 to be array
Last modified: February 17, 2020

---

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

 *  Resolved [sylarlocke](https://wordpress.org/support/users/sylarlocke/)
 * (@sylarlocke)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-16/)
 * Hi,
 * I have installed this module and the title message appears at the bottom of the
   page:
 * “Warning: in_array () expects parameter 2 to be array”
 * I’ve been deactivating plugin in case anyone has any relationship and I have 
   seen that with the “Polylang” plugin you have this conflict,
 * Is it possible to solve this problem when there are two languages?
 * This error is in line 180, exactly $current_lg
 *     ```
       function exit_popup() {
   
       	// Check for language
       	$check_lg = true;
       	if( array_key_exists( 'wpml_object_id' , $GLOBALS['wp_filter']) ) {
       		$epp_lg = get_option('exit_popup_languages');
   
       		$current_lg = ICL_LANGUAGE_CODE;
   
       		$check_lg = false;
   
       		if( in_array($current_lg, $epp_lg) ) $check_lg = true;
       	}
       ```
   
 * Thanks
    -  This topic was modified 6 years, 3 months ago by [sylarlocke](https://wordpress.org/support/users/sylarlocke/).

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

 * ![](https://ps.w.org/exit-popup/assets/icon-128x128.png?rev=1443992)
 * [Exit Popup](https://wordpress.org/plugins/exit-popup/)
 * [Support Threads](https://wordpress.org/support/plugin/exit-popup/)
 * [Active Topics](https://wordpress.org/support/plugin/exit-popup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/exit-popup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/exit-popup/reviews/)

## Tags

 * [languages](https://wordpress.org/support/topic-tag/languages/)
 * [multilanguages](https://wordpress.org/support/topic-tag/multilanguages/)

 * 0 replies
 * 1 participant
 * Last reply from: [sylarlocke](https://wordpress.org/support/users/sylarlocke/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/warning-in_array-expects-parameter-2-to-be-array-16/)
 * Status: resolved