[CurlFactory] Prevent undefined offset when using array for ssl_key options#2348
[CurlFactory] Prevent undefined offset when using array for ssl_key options#2348Nyholm merged 4 commits intoguzzle:masterfrom
Conversation
|
Has since been confirmed that the cause was options defined as such: $options = [
'ssl_key' => ['/some/file/path']
]This PR will prevent further warnings but the alternative is to validate properly that the options are both provided in the array or use a single string, thus making the above invalid and prompting a new release and update instructions. |
|
For maximum compatibility, I think it should be possible to use the array format without a key (even if it's not intended to be supported). We can deprecate that behavior though, and remove it in the next major release. @andrewnclark are you up for making that change? |
|
Also, can you please rebase your branch from master? |
Nyholm
left a comment
There was a problem hiding this comment.
I fixed the bug discovered by the test and I rebased the PR.
|
Thank you for the reviews and for the fix |
Hopefully resolves #2339 where the
ssl_keyoptions are provided using the array format, but without a password as the second item in the array.Still waiting conformation that this was the cause of the warnings, but this will avoid them going forward.
As always, feedback is appreciated.