From 6c4204ec9bcecb4f1faccb60553b640a109c8039 Mon Sep 17 00:00:00 2001 From: Chris Zarate Date: Wed, 27 Aug 2025 12:57:27 -0600 Subject: [PATCH 1/2] Coerce `team_id` to string before passing to `rawurlencode` --- formula-one/formula-one.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formula-one/formula-one.php b/formula-one/formula-one.php index 47dec5e..3e3f356 100644 --- a/formula-one/formula-one.php +++ b/formula-one/formula-one.php @@ -331,7 +331,7 @@ function formula_one_rdb_init(): void { 'endpoint' => function ( array $input_variables ) use ( $f1_data_source ): string { $endpoint = $f1_data_source->get_endpoint() . '/teams'; if ( ! empty( $input_variables['team_id'] ) ) { - $endpoint .= '?id=' . rawurlencode( $input_variables['team_id'] ); + $endpoint .= '?id=' . rawurlencode( strval( $input_variables['team_id'] ) ); } return $endpoint; }, From 51aa112eef6b04483d845e3113491385685c5f6e Mon Sep 17 00:00:00 2001 From: Andrew Fleming Date: Thu, 28 Aug 2025 14:46:30 +0400 Subject: [PATCH 2/2] Update formula-one.php Coerce input variable to string for both the team query and the driver query. --- formula-one/formula-one.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formula-one/formula-one.php b/formula-one/formula-one.php index 3e3f356..1032dc5 100644 --- a/formula-one/formula-one.php +++ b/formula-one/formula-one.php @@ -137,7 +137,7 @@ function formula_one_rdb_init(): void { 'endpoint' => function ( array $input_variables ) use ( $f1_data_source ): string { $endpoint = $f1_data_source->get_endpoint() . '/drivers'; if ( ! empty( $input_variables['driver_id'] ) ) { - $endpoint .= '?id=' . rawurlencode( $input_variables['driver_id'] ); + $endpoint .= '?id=' . rawurlencode( strval( $input_variables['driver_id'] ) ); } return $endpoint; },