diff --git a/IntaroCrmRestApi.php b/IntaroCrmRestApi.php index 5120f61..1fa0b48 100644 --- a/IntaroCrmRestApi.php +++ b/IntaroCrmRestApi.php @@ -50,7 +50,10 @@ class IntaroCrmRestApi public function getLastError() { - return $this->statusCode . ' ' . $this->lastError; + if (!is_null($this->lastError)) + return $this->statusCode . ' ' . $this->lastError; + else + return null; } public function getLastErrorMessage()