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:
commit
058bacda10
|
@ -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
|
||||
|
|
Reference in New Issue