From e352098f28198c90fe2294937140121e836953ff Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 14 Oct 2011 18:36:11 +0000 Subject: [PATCH] reduce PHP notices --- lam/lib/ufpdf.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lam/lib/ufpdf.php b/lam/lib/ufpdf.php index 3bec8a29..4f9858f5 100644 --- a/lam/lib/ufpdf.php +++ b/lam/lib/ufpdf.php @@ -238,8 +238,6 @@ function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0) { //Get next character $c = $this->code2utf($cp[$i]); - $charw = $cw[$cp[$i]]; - if($c=="\n") { //Explicit line break @@ -265,7 +263,9 @@ function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0) $ls=$l; $ns++; } - $l+=$charw; + if (isset($cw[$cp[$i]])) { + $l += $cw[$cp[$i]]; + } if($l>$wmax) {