minor #17838 Remove duplicate validation in RedirectResponse (Tobion)
This PR was merged into the 2.3 branch.
Discussion
----------
Remove duplicate validation in RedirectResponse
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d27c4f4
Remove duplicate validation in RedirectResponse
This commit is contained in:
commit
f01cda604c
@ -33,10 +33,6 @@ class RedirectResponse extends Response
|
|||||||
*/
|
*/
|
||||||
public function __construct($url, $status = 302, $headers = array())
|
public function __construct($url, $status = 302, $headers = array())
|
||||||
{
|
{
|
||||||
if (empty($url)) {
|
|
||||||
throw new \InvalidArgumentException('Cannot redirect to an empty URL.');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::__construct('', $status, $headers);
|
parent::__construct('', $status, $headers);
|
||||||
|
|
||||||
$this->setTargetUrl($url);
|
$this->setTargetUrl($url);
|
||||||
|
Reference in New Issue
Block a user