PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/component/audit/class-options-audit.php +5 -5 5.4.0 → 6.3.0 View file →
@@ -47,11 +47,11 @@
47 47 $option = $args[1]['option'];
48 48 $old = $args[1]['old_value'];
49 49 $new = $args[1]['value'];
50 50 $option_human_read = self::key_to_human_name( $option );
51 - // To avoid the recursive compare if both are nested array, convert all to string.
52 - $check1 = is_array( $old ) ? wp_json_encode( $old ) : $old;
53 - $check2 = is_array( $new ) ? wp_json_encode( $new ) : $new;
51 + // Normalize both values to strings (JSON for arrays/objects) so type-only changes, e.g. int 1 vs string "1", aren't logged.
52 + $check1 = ( is_array( $old ) || is_object( $old ) ) ? wp_json_encode( $old ) : (string) $old;
53 + $check2 = ( is_array( $new ) || is_object( $new ) ) ? wp_json_encode( $new ) : (string) $new;
54 54
55 55 if ( $check1 === $check2 ) {
56 56 return false;
57 57 }
@@ -81,9 +81,9 @@
81 81 global $wp_locale;
82 82 $old_day = $wp_locale->get_weekday( $old );
83 83 $new_day = $wp_locale->get_weekday( $new );
84 84 $text = sprintf(
85 - /* translators: 1: Blog name, 2: User's display name, 3: Option: Week Starts On, 4: Old day, 5: New day */
85 + /* translators: 1: Blog name, 2: User's display name, 3: Option label, 4: Old option value, 5: New option value */
86 86 esc_html__( '%1$s %2$s update option %3$s from %4$s to %5$s', 'defender-security' ),
87 87 $blog_name,
88 88 $user_name,
89 89 $option_human_read,
@@ -233,9 +233,9 @@
233 233 )
234 234 );
235 235
236 236 if ( isset( $human_read[ $key ] ) ) {
237 - if ( empty( $human_read[ $key ] ) ) {
237 + if ( '' === $human_read[ $key ] ) {
238 238 return $key;
239 239 }
240 240
241 241 return $human_read[ $key ];