X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/1987da66623bb8751c59e8133b7654a871000857..aead0a7b499e41bc46386fe238507e679967b1ff:/lib/MECON/PDF/Tabla.php?ds=sidebyside diff --git a/lib/MECON/PDF/Tabla.php b/lib/MECON/PDF/Tabla.php index db1f332..7765220 100644 --- a/lib/MECON/PDF/Tabla.php +++ b/lib/MECON/PDF/Tabla.php @@ -177,14 +177,16 @@ class MECON_PDF_Tabla extends MECON_PDF_Contenido { for ($row = 0; $row<$this->_tabla->getRowCount(); $row++) { for ($i=0; $i<$this->_tabla->getColCount(); $i++ ) { $tmp = $this->_tabla->getCellAttributes($row,$i); - if(intval($tmp['width']) != 0) + if(@intval($tmp['width']) != 0) $attr[$i] = intval($tmp['width']); - if(count($attr) == $this->_tabla->getColCount()) - break; + if(@count($attr) == $this->_tabla->getColCount()) + break 2; } - if(count($attr) == $this->_tabla->getColCount()) - break; } + + if (!isset($attr)) + die ('Todas las columnas tienen que tener un ancho asignado'); + $tmp = array_sum($attr); $attr2[0] = 0;