Title: Warning: array_key_exists() expects parameter 2 to be array, null given in /path
Last modified: October 22, 2021

---

# Warning: array_key_exists() expects parameter 2 to be array, null given in /path

 *  Resolved [sbehere](https://wordpress.org/support/users/sbehere/)
 * (@sbehere)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given-in-path/)
 * i am getting this warning message at the top of page.
    Warning: array_key_exists()
   expects parameter 2 to be array, null given in /path/wp-content/plugins/weglot/
   src/services/class-option-service-weglot.php on line 475
 * i already remove blank space before and after <?php and ?>
    below is code
 * 471. ‘public function get_option_button( $key ) {
    472. $options = $this->get_options();
   473. if (array_key_exists( ‘custom_settings’, $options ) && 474. is_array( $options[‘
   custom_settings’] ) && 475. array_key_exists( $key, $options[‘custom_settings’][‘
   button_style’] ) 476. ) { 477. return $options[‘custom_settings’][‘button_style’][
   $key ]; 478. }`
 * Please help to solve.
    -  This topic was modified 4 years, 7 months ago by [sbehere](https://wordpress.org/support/users/sbehere/).

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Edson Galina Fortes](https://wordpress.org/support/users/glx77/)
 * (@glx77)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given-in-path/#post-15004453)
 * Hi [@sbehere](https://wordpress.org/support/users/sbehere/) ,
 * hope you’re fine? Can you give me the version of the plugin you are using ?
 * Best

Viewing 1 replies (of 1 total)

The topic ‘Warning: array_key_exists() expects parameter 2 to be array, null given
in /path’ is closed to new replies.

 * ![](https://ps.w.org/weglot/assets/icon-256x256.gif?rev=3333666)
 * [Translate WordPress with Weglot - Multilingual AI Translation](https://wordpress.org/plugins/weglot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/weglot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/weglot/)
 * [Active Topics](https://wordpress.org/support/plugin/weglot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/weglot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/weglot/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Edson Galina Fortes](https://wordpress.org/support/users/glx77/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given-in-path/#post-15004453)
 * Status: resolved