Skip to content

Commit

Permalink
minor #15077 [HttpFoundation] Use convention to allow throwing from _…
Browse files Browse the repository at this point in the history
…_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()
  • Loading branch information
nicolas-grekas committed Jun 25, 2015
2 parents ba4a5eb + 8982c32 commit 058bacd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/Request.php
Expand Up @@ -480,7 +480,7 @@ public function __toString()
try {
$content = $this->getContent();
} catch (\LogicException $e) {
trigger_error($e->getMessage(), E_USER_ERROR);
return trigger_error($e, E_USER_ERROR);
}

return
Expand Down

0 comments on commit 058bacd

Please sign in to comment.