Thanks to visit codestin.com
Credit goes to github.com

Skip to content

array_pad on list+explode#242

Open
bucha wants to merge 1 commit intophp-vcr:masterfrom
Cartware:master
Open

array_pad on list+explode#242
bucha wants to merge 1 commit intophp-vcr:masterfrom
Cartware:master

Conversation

@bucha
Copy link

@bucha bucha commented Feb 9, 2018

This fixes some edge-cases that we encountered during unit-tests, where the response might not carry a body for example.

Context

What has been done

How to test

Todo

  • [ ]
  • [ ]

Notes

This fixes some edge-cases that we encountered during unit-tests, where the response might not carry a body for example.
list($rawHeader, $rawBody) = explode("\r\n\r\n", $response, 2);

list($rawHeader, $rawBody) = array_pad(explode("\r\n\r\n", $response, 2), 2, '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental indentation?

@MrRio
Copy link
Contributor

MrRio commented Feb 9, 2018

This is missing a unit test and those items from the PR template.

@bucha
Copy link
Author

bucha commented Feb 9, 2018 via email

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.

2 participants