Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only create stream_context if curl is not used #4

Merged
merged 1 commit into from
Jul 7, 2015

Conversation

dehaas-j
Copy link

@dehaas-j dehaas-j commented Jul 7, 2015

Admittedly, this is not a dramatic improvement, but I changed this as I was working on something else.

Before, __call would initialize the $opts and $context variables that are only used by fopen, not cURL. This commit places their initialization in the else-branch of the if-statement that determines if cURL can be used.

In __call, the variables $opts and $context were initialized even if
they were not needed. This commit remedies this by moving their
initialization to the else-branch of the if-statement that checks if
curl can be used.
weberhofer added a commit that referenced this pull request Jul 7, 2015
Only create stream_context if curl is not used. Thank you, @dajero
@weberhofer weberhofer merged commit b31ec55 into weberhofer:master Jul 7, 2015
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