|
|
@@ -68,7 +68,7 @@ Class VAT {
|
|
|
|
|
|
private $ch, $dom, $headers;
|
|
|
private $cookies = "php://memory";
|
|
|
- private $message = [""];
|
|
|
+ private $message = [];
|
|
|
private $initialized = false;
|
|
|
|
|
|
private function getHeaders($ch, $header) {
|
|
|
@@ -158,11 +158,13 @@ Class VAT {
|
|
|
}
|
|
|
|
|
|
public function getMessage($whole = false) {
|
|
|
+ if (!$this->message) $this->message = ["Brak wyniku"];
|
|
|
if ($whole) return $this->message;
|
|
|
else return $this->message[0];
|
|
|
}
|
|
|
|
|
|
public function isActiveVatPayer($nip) {
|
|
|
+ $this->message = [];
|
|
|
$nip = str_replace("-", "", trim($nip));
|
|
|
if (!$this->validateNIP($nip)) throw new Exception("Błędny NIP");
|
|
|
|