bug #29004 [BrowserKit] Remove undefined variable $str (samnela)
This PR was merged into the 4.2-dev branch.
Discussion
----------
[BrowserKit] Remove undefined variable $str
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | no <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest 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 the master branch.
-->
Commits
-------
4b3fdd60d1
[BrowserKit] Remove undefined variable
This commit is contained in:
commit
edcd627230
@ -110,7 +110,7 @@ class Cookie
|
||||
}
|
||||
|
||||
if (null !== $this->samesite) {
|
||||
$str .= '; samesite='.$this->samesite;
|
||||
$cookie .= '; samesite='.$this->samesite;
|
||||
}
|
||||
|
||||
return $cookie;
|
||||
|
@ -29,6 +29,9 @@ class CookieTest extends TestCase
|
||||
|
||||
$cookie = new Cookie('foo', 'bar', 0, '/', '');
|
||||
$this->assertEquals('foo=bar; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; httponly', (string) $cookie);
|
||||
|
||||
$cookie = new Cookie('foo', 'bar', 2, '/', '', true, true, false, 'lax');
|
||||
$this->assertEquals('foo=bar; expires=Thu, 01 Jan 1970 00:00:02 GMT; path=/; secure; httponly; samesite=lax', (string) $cookie);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user