minor #15077 [HttpFoundation] Use convention to allow throwing from __toString() (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Use convention to allow throwing from __toString()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Corollary to #15076, works without it.

Commits
-------

8982c32 [HttpFoundation] Use convention to allow throwing from __toString()
This commit is contained in:
Nicolas Grekas 2015-06-25 11:05:04 +02:00
commit 058bacda10
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ class Request
try {
$content = $this->getContent();
} catch (\LogicException $e) {
trigger_error($e->getMessage(), E_USER_ERROR);
return trigger_error($e, E_USER_ERROR);
}
return