Skip to content

Commit 8663294

Browse files
committed
Fixed psalm errors.
1 parent 74a2821 commit 8663294

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/wpgraphql-logging/src/Admin/View/List/List_Table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function process_bulk_action(): void {
131131
}
132132

133133
$nonce_action = 'bulk-' . esc_attr( $this->_args['plural'] );
134-
$nonce_value = isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( (string) $_REQUEST['_wpnonce'] ) ) : '';
134+
$nonce_value = isset( $_REQUEST['_wpnonce'] ) && is_string( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '';
135135

136136
$nonce = is_string( $nonce_value ) ? $nonce_value : '';
137137

@@ -168,8 +168,8 @@ public function process_bulk_action(): void {
168168
$filter_keys = [ 'level_filter', 'start_date', 'end_date' ];
169169

170170
foreach ( $filter_keys as $key ) {
171-
$value = isset( $_REQUEST[ $key ] ) ? sanitize_text_field( wp_unslash( (string) $_REQUEST[ $key ] ) ) : null;
172-
if ( ! empty( $value ) && is_string( $value ) ) {
171+
$value = isset( $_REQUEST[ $key ] ) && is_string( $_REQUEST[ $key ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $key ] ) ) : null;
172+
if ( ! empty( $value ) ) {
173173
$preserved_filters[ $key ] = $value;
174174
}
175175
}

0 commit comments

Comments
 (0)