Skip to content

Commit

Permalink
fix: validate array key instead of array value
Browse files Browse the repository at this point in the history
  • Loading branch information
mastudillot committed Sep 9, 2024
1 parent 91791be commit 3e4d578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/src/Helpers/WebpayTransactionsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function prepare_items()
global $wpdb;

$orderByColumns = $this->get_sortable_columns();
$orderby = isset($_GET['orderby']) && in_array($_GET['orderby'], $orderByColumns)
$orderby = isset($_GET['orderby']) && array_key_exists($_GET['orderby'], $orderByColumns)
? esc_sql($_GET['orderby'])
: 'ID';

Expand Down

0 comments on commit 3e4d578

Please sign in to comment.