You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
The code below gets a cookie jar that has a array with a numerical key 0. I think this is because the domain is null. Well it turns out that setCookies eventually calls addCookie(name, value). Then somewhere in addCookie it checks a case if name is a string and uses value. Well that's the case it's probably supposed to hit but since somewhere that array key got null, it turned into 0, and it throws an invalid type exception.
$httpClient->setUri($params['loginUrl']);
$httpClient->setParameterPost([
'name' => $params['username'],
'password' => $params['password']
]);
$response = $httpClient->setMethod('POST')->send();
$cookiejar = \Zend\Http\Cookies::fromResponse($response, ""); <----nothing in that second param works and that's probably part of the problem
$httpClient->setCookies($cookiejar->getAllCookies());