Skip to content

Commit

Permalink
Fix. Scan. Added check for signatures count.
Browse files Browse the repository at this point in the history
  • Loading branch information
svfcode committed Dec 14, 2023
1 parent d3b5e83 commit 5faae32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,10 @@ public function send_results() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.
$signatures_found = isset($spbc->data['scanner']['signatures_found']) ? $spbc->data['scanner']['signatures_found'] : [];
$signatures_found = json_encode($signatures_found);

if ( is_null($signatures_count) && is_string($signatures_found) ) {
$signatures_count = count(json_decode($signatures_found, true));
}

// API. Sending files scan result
$result = API::method__security_mscan_logs(
$key,
Expand Down

0 comments on commit 5faae32

Please sign in to comment.