From fc482d3b3dfe4d7c4d78fee4f0f00d05c962f6f6 Mon Sep 17 00:00:00 2001 From: Manuel Nazar Anchorena Date: Mon, 24 Nov 2003 14:52:39 +0000 Subject: [PATCH] Algunos retoques a MECON_PDF_Tabla. Nada de otro mundo --- lib/MECON/PDF/Tabla.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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; -- 2.43.0