diff --git a/htdocs/includes/tcpdi/tcpdi.php b/htdocs/includes/tcpdi/tcpdi.php index 48fdd8198f5..999ff99ea5b 100644 --- a/htdocs/includes/tcpdi/tcpdi.php +++ b/htdocs/includes/tcpdi/tcpdi.php @@ -580,7 +580,7 @@ class TCPDI extends FPDF_TPL { * close all files opened by parsers */ function _closeParsers() { - if ($this->state > 2 && count($this->parsers) > 0) { + if ($this->state > 2 && is_array($this->parsers) && count($this->parsers) > 0) { $this->cleanUp(); return true; }