Skip to content

Commit 871e79b

Browse files
authored
fix: null-safe check of query string key closes #226 (#227)
* fix: null-safe check of query string key closes #226 * tweak: remove non-existent test * ci: add codecov token * ci: add codecov slug * ci: tweak slug
1 parent 711d296 commit 871e79b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ jobs:
9292

9393
- name: Upload to Codecov
9494
uses: codecov/codecov-action@v5
95+
with:
96+
token: ${{ secrets.CODECOV_TOKEN }}
97+
slug: PhpGt/Http
9598

9699
phpstan:
97100
runs-on: ubuntu-latest

phpcs.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<rule ref="Generic.Files.OneObjectStructurePerFile" />
2525
<rule ref="Generic.Files.OneTraitPerFile" />
2626
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
27-
<rule ref="Generic.Formatting.NoSpaceAfterCast" />
2827
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
2928
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
3029
<rule ref="Generic.Metrics.CyclomaticComplexity" />

src/ServerRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function withCookieParams(array $cookies):self {
9393
* @return array<string, string|array<string>>
9494
*/
9595
public function getQueryParams():array {
96-
parse_str($this->serverData["QUERY_STRING"], $params);
96+
parse_str($this->serverData["QUERY_STRING"] ?? "", $params);
9797
/** @var array<string, string|array<string>> $params */
9898
return $params;
9999
}

0 commit comments

Comments
 (0)