diff --git a/Trustly/Api/api.php b/Trustly/Api/api.php index c9fee7d..1c1ea4e 100644 --- a/Trustly/Api/api.php +++ b/Trustly/Api/api.php @@ -315,7 +315,7 @@ public function post($url=NULL, $postdata=NULL) { $body = curl_exec($curl); if($body === FALSE) { $error = curl_error($curl); - if($error === NULL) { + if(!$error) { $error = 'Failed to connect to the Trusly API'; } throw new Trustly_ConnectionException($error);