Support » Plugin: WP Maintenance Mode » Error in debug.log

  • Resolved Peter Smits



    I have installed your plugin, but it generates an error
    array_key_exists() expects parameter 2 to be array, boolean given in /www/wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode-admin.php on line 548

    It seems this error is present in more plugins.
    Could you fix this please

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author George J


    Hello @psmits1567,

    You can try to edit wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode-admin.php and replace this line:

    if (array_key_exists('general', $this->plugin_settings) && $this->plugin_settings['general']['status'] == 1 && $this->plugin_settings['general']['notice'] == 1) {

    with this line:

    if (is_array($this->plugin_settings) && array_key_exists('general', $this->plugin_settings) && $this->plugin_settings['general']['status'] == 1 && $this->plugin_settings['general']['notice'] == 1) {

    If multiple plugins generate the same error, maybe your blog has some problems with reading the options from the database.


    • This reply was modified 3 months, 1 week ago by  George J.

    Hi George

    I have added your change to the file, and it seems to solve the problem
    I need to perform some more testing to make sure it is 100% ok
    But for now no errors anymore.

    I did not mean that I have problems with other plugins
    But when researching the problem, I found more plugins that created this error.
    So I think it has something to do with the version of WordPress.
    I am running on the latest version

    Thanks for your quick support:)

    Plugin Author George J


    @psmits1567 you’re welcome.

    We test the plugin every time WordPress releases a new version, and there are no errors with the latest version of WordPress on our test environment (nginx 1.15.8 + PHP 7.3.1). We also use the plugin in production, and everything seems to be fine.


Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.