Fixed php 7.2 count() compatibility and intval cast in number_format2 parameter 2.
[fa-stable.git] / reporting / includes / fpdi / fpdi.php
index d9ab7ced482db3fc0c18b413398c101b3e693be9..097491df0266f8527dc834cf4f001613c7cf84fe 100644 (file)
@@ -486,7 +486,7 @@ class FPDI 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) {
                foreach ($this->parsers as $k => $_){
                $this->parsers[$k]->closeFile();
                $this->parsers[$k] = null;