Skip to content
Browse files

Merge pull request #328 from ezheidtmann/exception-if-no-curl

Throw a RuntimeException if the cURL extension is not present
  • Loading branch information...
2 parents 8a14a60 + 5dda915 commit e3470f68606041172b08d7eab828bb9204dfbc84 @mtdowling mtdowling committed May 25, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/Guzzle/Http/Client.php
View
3 src/Guzzle/Http/Client.php
@@ -79,6 +79,9 @@ public static function getAllEvents()
*/
public function __construct($baseUrl = '', $config = null)
{
+ if (!extension_loaded('curl')) {
+ throw new RuntimeException('The PHP cURL extension must be installed to use Guzzle.');
+ }
$this->setConfig($config ?: new Collection());
$this->initSsl();
$this->setBaseUrl($baseUrl);

0 comments on commit e3470f6

Please sign in to comment.
Something went wrong with that request. Please try again.