Skip to content

Conversation

@TrekLaps
Copy link

The existing chain passed $data as 2nd constructor argument, but FileCookieJar::__construct() signature is:
__construct(string $cookieFile, bool $storeSessionCookies = false)

The 2nd parameter is a boolean, not the data to write.

This fix:

  • Properly creates SetCookie objects with the payload
  • Uses reflection to set the cookies array
  • Tested on Guzzle 7.10.0 / PHP 8.4.17

The existing chain passed $data as 2nd constructor argument, but
FileCookieJar::__construct() signature is:
  __construct(string $cookieFile, bool $storeSessionCookies = false)

The 2nd parameter is a boolean, not the data to write.

This fix:
- Properly creates SetCookie objects with the payload
- Uses reflection to set the cookies array
- Tested on Guzzle 7.10.0 / PHP 8.4.17

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant