Skip to content

Commit 136dadf

Browse files
committed
minor symfony#9149 Fix passing arguments to "Client" constructor (liviubalan)
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes symfony#9149). Discussion ---------- Fix passing arguments to "Client" constructor "Client" is expecting an instance of "CookieJar", not "Cookie" Commits ------- dc438d2 Fix passing arguments to "Client" constructor
2 parents 9661886 + dc438d2 commit 136dadf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/browser_kit.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ into the client constructor::
190190
use Acme\Client;
191191

192192
// create cookies and add to cookie jar
193-
$cookieJar = new Cookie('flavor', 'chocolate', strtotime('+1 day'));
193+
$cookie = new Cookie('flavor', 'chocolate', strtotime('+1 day'));
194+
$cookieJar = new CookieJar();
195+
$cookieJar->set($cookie);
194196

195197
// create a client and set the cookies
196198
$client = new Client(array(), null, $cookieJar);

0 commit comments

Comments
 (0)