Skip to content

Commit

Permalink
Protect: Update Scan History extension types (#40548)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta authored Dec 10, 2024
1 parent 91ee20a commit 9a1cb0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/protect/src/class-scan-history.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ private static function normalize_api_data( $scan_data ) {
}

foreach ( $scan_data->threats as $source_threat ) {
if ( ! empty( $source_threat->extension ) && in_array( $source_threat->extension->type, array( 'plugin', 'theme' ), true ) ) {
$source_threat->extension->type .= 's';
}

$history->threats[] = new Threat_Model( $source_threat );
}

Expand Down

0 comments on commit 9a1cb0a

Please sign in to comment.