1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-01-29 11:17:44 +01:00

Adding check to see if curl is installed. Closes #9

This commit is contained in:
Michael Dowling 2011-11-12 17:37:59 -06:00
parent 17b9a70d9a
commit bc8dca93af

View File

@ -64,7 +64,12 @@ class Guzzle
public static function getCurlInfo($type = null)
{
if (!self::$curl) {
self::$curl = curl_version();
self::$curl = @curl_version();
// @codeCoverageIgnoreStart
if (!self::$curl) {
throw new \RuntimeException('Guzzle requires curl');
}
// @codeCoverageIgnoreEnd
// Check if CURLOPT_FOLLOWLOCATION is available
self::$curl['follow_location'] = !ini_get('open_basedir');
}