Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Update lib/Buzz/Client/AbstractCurl.php #99

wants to merge 1 commit into from

4 participants


Improved curl proper installation/initialization check

Without this check, if you have curl not installed/misconfigured, the RuntimeException is never thrown because everything is stopped by the following error:

Fatal error: Call to undefined function Buzz\Client\curl_init() in .../vendor/kriswallsmith/buzz/lib/Buzz/Client/AbstractCurl.php on line 26
@lmammino lmammino Update lib/Buzz/Client/AbstractCurl.php
Improved curl proper installation/initialization check

+1 merge please.


I would rather not pollute runtime with dependency checks…


@kriswallsmith, I may agree with you but IMHO if you want to do so you should remove the whole check (instead having a partially functional check)


According to the PHP manual curl_init() will return "FALSE on errors." This is not a check to see if the extension is installed.


Ok, now I truly got your point of view. So you can consider the issue closed and reject the pull request.


Thanks @lmammino!


No need to say thanks @kriswallsmith !
Me and the whole PHP community should say thanks to you for giving us Assetic, Buzz and Spork :+1:

Keep coding with such brilliance, man!


Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 8, 2012
  1. @lmammino

    Update lib/Buzz/Client/AbstractCurl.php

    lmammino authored
    Improved curl proper installation/initialization check
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Buzz/Client/AbstractCurl.php
2  lib/Buzz/Client/AbstractCurl.php
@@ -23,7 +23,7 @@
static protected function createCurlHandle()
- if (false === $curl = curl_init()) {
+ if (!function_exists("curl_init") || false === $curl = curl_init()) {
throw new \RuntimeException('Unable to create a new cURL handle');
Something went wrong with that request. Please try again.