diff --git a/inc/spbc-scanner.php b/inc/spbc-scanner.php index f5ff12990..da67404e0 100644 --- a/inc/spbc-scanner.php +++ b/inc/spbc-scanner.php @@ -243,6 +243,7 @@ function spbc_scanner_file_send($direct_call = false, $file_id = null) $file_info['full_hash'] ); $result_heur = $heuristic_scanner->scanFile($file_to_check, $root_path); + if (is_array($result_heur) && ! empty($result_heur['error'])) { $output = array('error' => 'RESCANNING_FAILED'); if ( !$direct_call ) { @@ -260,6 +261,7 @@ function spbc_scanner_file_send($direct_call = false, $file_id = null) $file_info['full_hash'] ); $result_sign = $signatures_scanner->scanFile($file_to_check, $root_path, $signatures); + if (is_array($result_sign) && ! empty($result_sign['error'])) { $output = array('error' => 'RESCANNING_FAILED'); if ( !$direct_call ) { @@ -268,7 +270,7 @@ function spbc_scanner_file_send($direct_call = false, $file_id = null) return $output; } - $mixed_result = Arr::mergeWithSavingNumericKeysRecursive($result_sign->weak_spots, $result_heur->weak_spots); + $mixed_result = Arr::mergeWithSavingNumericKeysRecursive((array)$result_heur, (array)$result_sign); $wpdb->update( SPBC_TBL_SCAN_FILES,