Title: array_key_exists throws warning when plugin_settings is false
Last modified: March 22, 2020

---

# array_key_exists throws warning when plugin_settings is false

 *  Resolved [daberelay](https://wordpress.org/support/users/daberelay/)
 * (@daberelay)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/array_key_exists-throws-warning-when-plugin_settings-is-false/)
 * function add_notices in /includes/classes/wp-maintenance-mode-admin.php
    line
   548 throws a warning about $this->plugin_settings being false while array_key_exists
   expects second param to be an array.
 * might i suggest the following fix:
 *     ```
        if (array_key_exists('general', is_array($this->plugin_settings) ? $this->plugin_settings : []) && ....
       ```
   

Viewing 1 replies (of 1 total)

 *  [George J](https://wordpress.org/support/users/georgejipa/)
 * (@georgejipa)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/array_key_exists-throws-warning-when-plugin_settings-is-false/#post-12571943)
 * Hello [@daberelay](https://wordpress.org/support/users/daberelay/),
 * Thanks, I will apply the suggested fix in a future release.
 * —
    George
    -  This reply was modified 6 years, 2 months ago by [George J](https://wordpress.org/support/users/georgejipa/).

Viewing 1 replies (of 1 total)

The topic ‘array_key_exists throws warning when plugin_settings is false’ is closed
to new replies.

 * ![](https://ps.w.org/wp-maintenance-mode/assets/icon-256x256.gif?rev=3027645)
 * [LightStart - Maintenance Mode, Coming Soon and Landing Page Builder](https://wordpress.org/plugins/wp-maintenance-mode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-maintenance-mode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-maintenance-mode/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-maintenance-mode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-maintenance-mode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-maintenance-mode/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [George J](https://wordpress.org/support/users/georgejipa/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/array_key_exists-throws-warning-when-plugin_settings-is-false/#post-12571943)
 * Status: resolved