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

cURL Compatibility Improvement #125

Merged
merged 2 commits into from May 19, 2013
Merged

cURL Compatibility Improvement #125

merged 2 commits into from May 19, 2013

Conversation

jaswrks
Copy link
Contributor

@jaswrks jaswrks commented May 19, 2013

Updating prepare() so that it considers the current PHP environment. safe_mode and open_basedir will not allow cURL to FOLLOWLOCATION.

See also: http://www.edmondscommerce.co.uk/curl/php-curl-curlopt_followlocation-and-open_basedir-or-safe-mode/

Updating `prepare()` so that it considers the current PHP environment. `safe_mode` and `open_basedir` will not allow `cURL` to `FOLLOWLOCATION`.

See also: http://www.edmondscommerce.co.uk/curl/php-curl-curlopt_followlocation-and-open_basedir-or-safe-mode/
@@ -189,9 +189,11 @@ protected function prepare($curl, RequestInterface $request, array $options = ar
if ($this->proxy) {
curl_setopt($curl, CURLOPT_PROXY, $this->proxy);
}

$can_follow = (!ini_get('safe_mode') && !ini_get('open_basedir'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use camelcased variabled names.
And the braces are useless

Using camelCase and removing brackets.
@jaswrks
Copy link
Contributor Author

jaswrks commented May 19, 2013

Done :-) Thank you.

kriswallsmith added a commit that referenced this pull request May 19, 2013
cURL Compatibility Improvement
@kriswallsmith kriswallsmith merged commit 759432d into kriswallsmith:master May 19, 2013
@kriswallsmith
Copy link
Owner

Thanks!

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.

None yet

3 participants