Skip to content

Commit

Permalink
Add a check for the "legacy" query string parameter to actually exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Konamiman committed Oct 23, 2023
1 parent a555e09 commit 7949d74
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -317,7 +317,8 @@ public function prepare_items() {

$args['paginate'] = true;

if ( 'true' === sanitize_key( wp_unslash( $_REQUEST['legacy'] ) ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( 'true' === sanitize_key( wp_unslash( $_REQUEST['legacy'] ?? null ) ) ) {
$args['api_version'] = -1;
}

Expand Down

0 comments on commit 7949d74

Please sign in to comment.