Skip to content

Commit

Permalink
added attribute and options checks when clearing the selector of inva…
Browse files Browse the repository at this point in the history
…lid data
  • Loading branch information
Fellan-91 committed May 13, 2024
1 parent e201300 commit 1599b41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/class-security.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ public static function sanitize_selector( $attribute, $control ) {
if (
empty( $control['value_callback'] ) &&
! empty( $control['options'] ) &&
! $control['multiple'] &&
is_array( $control['options'] ) &&
! is_array( $attribute ) &&
! is_object( $attribute ) &&
! array_key_exists( $attribute, $control['options'] )
) {
$attribute = $control['default'] ?? '';
Expand Down

0 comments on commit 1599b41

Please sign in to comment.