diff --git a/admin/aioseop_module_class.php b/admin/aioseop_module_class.php index f1c11c0ec..3a50c94ea 100644 --- a/admin/aioseop_module_class.php +++ b/admin/aioseop_module_class.php @@ -424,6 +424,9 @@ function is_good_bot() { ); $botlist = apply_filters( $this->prefix . 'botlist', $botlist ); if ( ! empty( $botlist ) ) { + if( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { + return false; + } $ua = $_SERVER['HTTP_USER_AGENT']; $uas = $this->quote_list_for_regex( $botlist ); if ( preg_match( '/' . $uas . '/i', $ua ) ) { @@ -596,6 +599,9 @@ function is_bad_bot() { $botlist = $this->default_bad_bots(); $botlist = apply_filters( $this->prefix . 'badbotlist', $botlist ); if ( ! empty( $botlist ) ) { + if( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { + return false; + } $ua = $_SERVER['HTTP_USER_AGENT']; $uas = $this->quote_list_for_regex( $botlist ); if ( preg_match( '/' . $uas . '/i', $ua ) ) {