Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit e3470f68606041172b08d7eab828bb9204dfbc84 2 parents 8a14a60 + 5dda915
@mtdowling mtdowling authored
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);
Please sign in to comment.
Something went wrong with that request. Please try again.