Skip to content

Commit

Permalink
Protect Status: fix possible undefined array key warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Dec 15, 2024
1 parent 4ff8c90 commit 26cf62a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/packages/protect-status/src/class-scan-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private static function normalize_api_data( $scan_data ) {

// Theme and Plugin Threats
if ( ! empty( $scan_threat->extension ) && in_array( $scan_threat->extension->type, array( 'plugin', 'theme' ), true ) ) {
$installed_extension = 'plugin' === $scan_threat->extension->type ? $plugins[ $scan_threat->extension->slug ] : $themes[ $scan_threat->extension->slug ];
$installed_extension = 'plugin' === $scan_threat->extension->type ? ( $plugins[ $scan_threat->extension->slug ] ?? null ) : ( $themes[ $scan_threat->extension->slug ] ?? null );

// If the extension is no longer installed, skip this threat.
// todo: use version_compare()
Expand Down

0 comments on commit 26cf62a

Please sign in to comment.