We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51865f8 commit 5856d7cCopy full SHA for 5856d7c
src/php/settings/settings.php
@@ -327,7 +327,8 @@ function sanitize_settings( array $input ): array {
327
// Attempt to sanitize the setting value.
328
$sanitized_value = sanitize_setting_value( $field, $input_value );
329
330
- if ( ! is_null( $sanitized_value ) && $settings[ $section_id ][ $field_id ] !== $sanitized_value ) {
+ $current_value = $settings[ $section_id ][ $field_id ] ?? null;
331
+ if ( ! is_null( $sanitized_value ) && $current_value !== $sanitized_value ) {
332
$settings[ $section_id ][ $field_id ] = $sanitized_value;
333
$updated = true;
334
}
0 commit comments