From 5faae325d0a6ca03e5fde65de118f99da9b5ea98 Mon Sep 17 00:00:00 2001 From: svfcode Date: Thu, 14 Dec 2023 12:52:40 +0300 Subject: [PATCH] Fix. Scan. Added check for signatures count. --- lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php b/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php index 51a6751b5..de65a86c8 100755 --- a/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php +++ b/lib/CleantalkSP/SpbctWP/Scanner/ScannerQueue.php @@ -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,