Skip to content

Commit

Permalink
Issue awesomemotive#355 Fix for PHP error
Browse files Browse the repository at this point in the history
  • Loading branch information
wpsmort authored Jun 22, 2016
1 parent bb7f3ec commit 13d55aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions admin/aioseop_module_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down Expand Up @@ -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 ) ) {
Expand Down

0 comments on commit 13d55aa

Please sign in to comment.