Skip to content

Commit

Permalink
Fix. Cure. Fixed occasion if CCI is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandergull committed Dec 27, 2024
1 parent 374da1e commit 678afc8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/CleantalkSP/SpbctWP/Scanner/Cure.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,17 @@ public function signatureCure($file, $signature, &$weak_spots_log)
{
global $spbc;

$cci_data = array();

if ( ! empty($signature->cci) ) {
$instructions = json_decode($signature->cci, true);
if ($instructions && !empty($instructions['cci']) && is_array($instructions['cci'])) {
$cci_data = $instructions['cci'];
}
}

foreach ( $instructions['cci'] as $instruction ) {
if ( ! empty($cci_data) ) {
foreach ( $cci_data as $instruction ) {
// Object
foreach ( $instruction['objects'] as $_key => &$object ) {
// Building path to file
Expand Down

0 comments on commit 678afc8

Please sign in to comment.