From: Manuel Nazar Anchorena Date: Mon, 24 Nov 2003 14:52:39 +0000 (+0000) Subject: Algunos retoques a MECON_PDF_Tabla. Nada de otro mundo X-Git-Tag: svn_import~171 X-Git-Url: https://git.llucax.com/mecon/meconlib.git/commitdiff_plain/fc482d3b3dfe4d7c4d78fee4f0f00d05c962f6f6?ds=inline Algunos retoques a MECON_PDF_Tabla. Nada de otro mundo --- 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;