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
-------

2248af5857 [HttpFoundation] Fix typo in exception message
This commit is contained in:
Fabien Potencier 2021-02-12 16:32:43 +01:00
commit 15e2067d50
2 changed files with 2 additions and 2 deletions

View File

@ -1573,7 +1573,7 @@ class Request
public function toArray()
{
if ('' === $content = $this->getContent()) {
throw new JsonException('Response body is empty.');
throw new JsonException('Request body is empty.');
}
try {

View File

@ -1260,7 +1260,7 @@ class RequestTest extends TestCase
{
$req = new Request();
$this->expectException(JsonException::class);
$this->expectExceptionMessage('Response body is empty.');
$this->expectExceptionMessage('Request body is empty.');
$req->toArray();
}