@@ -12576,7 +12576,7 @@ protected function _addfield($type, $name, $x, $y, $w, $h, $prop) {
12576
12576
$k = $this->k;
12577
12577
$this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%u,[%F,%F,%F,%F]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n";
12578
12578
$this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n";
12579
- while (list($key, $val) = each($prop) ) {
12579
+ foreach ($prop as $key => $val ) {
12580
12580
if (strcmp(substr($key, -5), 'Color') == 0) {
12581
12581
$val = TCPDF_COLORS::_JScolor($val);
12582
12582
} else {
@@ -16539,7 +16539,7 @@ protected function getHtmlDomArray($html) {
16539
16539
// get attributes
16540
16540
preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER);
16541
16541
$dom[$key]['attribute'] = array(); // reset attribute array
16542
- while (list($id, $name) = each($attr_array[1]) ) {
16542
+ foreach ($attr_array[1] as $id => $name ) {
16543
16543
$dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];
16544
16544
}
16545
16545
if (!empty($css)) {
@@ -16552,7 +16552,7 @@ protected function getHtmlDomArray($html) {
16552
16552
// get style attributes
16553
16553
preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
16554
16554
$dom[$key]['style'] = array(); // reset style attribute array
16555
- while (list($id, $name) = each($style_array[1]) ) {
16555
+ foreach ($style_array[1] as $id => $name ) {
16556
16556
// in case of duplicate attribute the last replace the previous
16557
16557
$dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);
16558
16558
}
@@ -16890,10 +16890,10 @@ protected function getHtmlDomArray($html) {
16890
16890
if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) {
16891
16891
$dom[$key]['fontname'] = $this->default_monospaced_font;
16892
16892
}
16893
- if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value']{1} ) > 0) AND (intval($dom[$key]['value']{1} ) < 7)) {
16893
+ if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1] ) > 0) AND (intval($dom[$key]['value'][1] ) < 7)) {
16894
16894
// headings h1, h2, h3, h4, h5, h6
16895
16895
if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) {
16896
- $headsize = (4 - intval($dom[$key]['value']{1} )) * 2;
16896
+ $headsize = (4 - intval($dom[$key]['value'][1] )) * 2;
16897
16897
$dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize;
16898
16898
}
16899
16899
if (!isset($dom[$key]['style']['font-weight'])) {
@@ -17775,7 +17775,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
17775
17775
// justify block
17776
17776
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
17777
17777
$this->lispacer = '';
17778
- continue ;
17778
+ break ;
17779
17779
}
17780
17780
preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches);
17781
17781
if (!isset($xmatches[1])) {
0 commit comments