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:
parent
17b9a70d9a
commit
bc8dca93af
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user