diff --git a/src/ProxmoxVE.php b/src/ProxmoxVE.php index 701593b..2fe0b92 100644 --- a/src/ProxmoxVE.php +++ b/src/ProxmoxVE.php @@ -154,6 +154,11 @@ public static function request( */ public function __construct($credentials) { + // Check if CURL is enabled + if (!function_exists('curl_version')) { + throw new RuntimeException('PHP5-CURL needs to be enabled!'); + } + if ($credentials instanceof Credentials) { $this->credentials = $credentials; @@ -179,7 +184,6 @@ public function __construct($credentials) throw new \InvalidArgumentException($errorMessage); } - $this->apiUrl = $this->credentials->getApiUrl(); if (!$this->authToken = $this->credentials->login()) {