10000 minor #40166 [HttpFoundation] Fix typo in exception message (carlos-ea) · symfony/symfony@15e2067 · GitHub
[go: up one dir, main page]

Skip to content

Commit 15e2067

Browse files
committed
minor #40166 [HttpFoundation] Fix typo in exception message (carlos-ea)
This PR was squashed before being merged into the 5.2 branch. Discussion ---------- [HttpFoundation] Fix typo in exception message | Q | A | ------------- | --- | Branch? | 5.2 for bug fixes | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | - <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Never break backward compatibility (see https://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - Features and deprecations must be submitted against branch 5.x. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry --> Commits ------- 2248af5 [HttpFoundation] Fix typo in exception message
2 parents 6dce322 + 2248af5 commit 15e2067

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ public function getContent(bool $asResource = false)
15731573
public function toArray()
15741574
{
15751575
if ('' === $content = $this->getContent()) {
1576-
throw new JsonException('Response body is empty.');
1576+
throw new JsonException('Request body is empty.');
15771577
}
15781578

15791579
try {

src/Symfony/Component/HttpFoundation/Tests/RequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ public function testToArrayEmpty()
12601260
{
12611261
$req = new Request();
12621262
$this->expectException(JsonException::class);
1263-
$this->expectExceptionMessage('Response body is empty.');
1263+
$this->expectExceptionMessage('Request body is empty.');
12641264
$req->toArray();
12651265
}
12661266

0 commit comments

Comments
 (0)
0