瀏覽代碼

Another bug fix

Mariusz Muszyński 8 年之前
父節點
當前提交
29d6e1860a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      SE/se-lib/VAT.php

+ 1 - 1
SE/se-lib/VAT.php

@@ -166,7 +166,7 @@ Class VAT {
 		$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) throw new Exception("Błąd danych ze strony Ministerstwa Finansów");
-		if (in_array($this->message[0], $this->messages)) 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");
 	}
 	}