From f6e0e4d4610eaf92b2075829bbae23fb1b96060f Mon Sep 17 00:00:00 2001 From: Micah Wood Date: Thu, 12 Dec 2024 21:33:36 -0500 Subject: [PATCH] Fix undefined array key Fixes this error: Warning: Undefined array key "QUERY_STRING" in /var/www/html/wp-content/plugins/wp-plugin-hostgator/vendor/newfold-labs/wp-module-coming-soon/includes/ComingSoon.php on line 249 --- includes/ComingSoon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ComingSoon.php b/includes/ComingSoon.php index db8199a..6291cda 100644 --- a/includes/ComingSoon.php +++ b/includes/ComingSoon.php @@ -246,7 +246,7 @@ public function notice_display() { * Load the coming soon page, if necessary. */ public function maybe_load_template() { - if ( ! is_user_logged_in() || 'preview=coming_soon' === $_SERVER['QUERY_STRING'] ) { + if ( ! is_user_logged_in() || ( isset( $_SERVER['QUERY_STRING'] ) && 'preview=coming_soon' === $_SERVER['QUERY_STRING'] ) ) { if ( isComingSoonActive() ) { self::coming_soon_content( $this->args ); die();