We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75d0bc4 commit 2df3146Copy full SHA for 2df3146
lib/PHPLicengine/Service/Client.php
@@ -36,8 +36,12 @@ public function __construct ($base_url, $api_key)
36
37
$response = $this->get($this->url.'/');
38
if (!$this->isCurlError()) {
39
- if (!$response->isValidResponse()) {
40
- throw new ResponseException ("Invalid PHPLicengine URL.");
+ if ($response->isOk()) {
+ if (!$response->isValidResponse()) {
41
+ throw new ResponseException ("Invalid PHPLicengine URL.");
42
+ }
43
+ } else {
44
+ throw new ResponseException ("Error ".$response->getResponseCode()." : ".$response->getReasonPhrase());
45
}
46
} else {
47
throw new CurlException ("Curl Connection: ".$this->getCurlErrno()." : ".$this->getCurlError());
0 commit comments