PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/component/class-firewall-logs.php +2 -2 5.7.0 → 6.3.0 View file →
@@ -79,9 +79,9 @@
79 79 }
80 80 }
81 81
82 82 $spam_comments_ip = Spam_Comment::get_spam_comments_ip();
83 - if ( ! empty( $spam_comments_ip ) ) {
83 + if ( array() !== $spam_comments_ip ) {
84 84 // Add spam comments IP to the compact log.
85 85 $this->log( $spam_comments_ip, 'spam-comment.log' );
86 86
87 87 foreach ( $spam_comments_ip as $ip => $count ) {
@@ -105,9 +105,9 @@
105 105 $logs = array();
106 106 // Retrieve the current list of blocked IPs from the site transient.
107 107 $ips = get_site_transient( \WP_Defender\Controller\Firewall_Logs::AKISMET_BLOCKED_IPS );
108 108 // Ensure the retrieved data is an array; if not, initialize it as an empty array.
109 - if ( is_array( $ips ) && ! empty( $ips ) ) {
109 + if ( is_array( $ips ) && array() !== $ips ) {
110 110 $this->log( $ips, 'spam-comment.log' );
111 111
112 112 foreach ( $ips as $ip => $count ) {
113 113 if ( ! isset( $logs[ $ip ] ) ) {