Skip to content

Commit 1cc9f54

Browse files
author
davydovct
committed
Fix sending sfw logs on empty table
1 parent 923601b commit 1cc9f54

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

CleanTalk/lib/Cleantalk/Antispam/SFW.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,8 @@ public function send_logs() {
281281
} else {
282282
return $result;
283283
}
284-
285-
} else {
286-
return array('error' => true, 'error_string' => 'NO_LOGS_TO_SEND');
287284
}
285+
return false;
288286
}
289287

290288
/*

CleanTalk/lib/Cleantalk/ApbctXF2/Funcs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function ctSFWUpdate($access_key) {
8484
public function ctSFWSendLogs($access_key) {
8585
$sfw = new CleantalkSFW($access_key);
8686
$result = $sfw->send_logs();
87-
if (empty($result['error'])) {
87+
if ($result) {
8888
$this->app->repository('XF:Option')->updateOption('ct_sfw_last_send_log',time());
8989
}
9090
}

0 commit comments

Comments
 (0)