Skip to content

Commit

Permalink
Check only successful requests. Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
ozh committed Mar 27, 2014
1 parent 88f8f80 commit 91d455b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function ozh_yourls_antispam_is_blacklisted( $url ) {
$domain = $parsed['host'] . '.' . $blacklist . '.';
$record = dns_get_record( $domain );

if( count( $record ) > 0 )
if( $record && count( $record ) > 0 )
return yourls_apply_filter( 'ozh_yourls_antispam_blacklisted', true );
}

Expand Down

0 comments on commit 91d455b

Please sign in to comment.