From bc8dca93af9b0ce9e174ae81ccaa0cbb6dacc66e Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Sat, 12 Nov 2011 17:37:59 -0600 Subject: [PATCH] Adding check to see if curl is installed. Closes #9 --- src/Guzzle/Guzzle.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Guzzle/Guzzle.php b/src/Guzzle/Guzzle.php index 68bdea3a..7bccee5a 100644 --- a/src/Guzzle/Guzzle.php +++ b/src/Guzzle/Guzzle.php @@ -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'); }