|
@@ -165,7 +165,11 @@ Class VAT {
|
|
|
$html = $array['html'];
|
|
$html = $array['html'];
|
|
|
$this->dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
|
|
$this->dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
|
|
|
$this->message = array_map("trim", array_values(array_diff(explode("|", $this->dom->getElementById("caption2_b-3")->textContent), [''])));
|
|
$this->message = array_map("trim", array_values(array_diff(explode("|", $this->dom->getElementById("caption2_b-3")->textContent), [''])));
|
|
|
- if (!$this->message) throw new Exception("Błąd danych ze strony Ministerstwa Finansów");
|
|
|
|
|
|
|
+ if (!$this->message) {
|
|
|
|
|
+ $this->message = array_map("trim", array_values(array_diff(explode("\n", $this->dom->getElementById("indicator_b-7")->getAttribute("title")), [''])));
|
|
|
|
|
+ if ($this->message) throw new Exception($this->message[0]);
|
|
|
|
|
+ else throw new Exception("Błąd danych ze strony Ministerstwa Finansów");
|
|
|
|
|
+ }
|
|
|
if (isset($this->messages[$this->message[0]])) return $this->messages[$this->message[0]]['active'];
|
|
if (isset($this->messages[$this->message[0]])) return $this->messages[$this->message[0]]['active'];
|
|
|
else throw new Exception("Nieznany rezultat");
|
|
else throw new Exception("Nieznany rezultat");
|
|
|
}
|
|
}
|