forked from galette/galette
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtcpdf-php7.2.patch
More file actions
30 lines (30 loc) · 1.59 KB
/
Copy pathtcpdf-php7.2.patch
File metadata and controls
30 lines (30 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff -up tcpdf/tcpdf.php.patch tcpdf/tcpdf.php
--- tcpdf/tcpdf.php.patch 2017-09-24 07:03:33.349380438 +0200
+++ tcpdf/tcpdf.php 2017-09-24 07:11:01.135350876 +0200
@@ -12582,7 +12582,7 @@ class TCPDF {
$k = $this->k;
$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";
$this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n";
- while (list($key, $val) = each($prop)) {
+ foreach ($prop as $key => $val) {
if (strcmp(substr($key, -5), 'Color') == 0) {
$val = TCPDF_COLORS::_JScolor($val);
} else {
@@ -16545,7 +16545,7 @@ class TCPDF {
// get attributes
preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER);
$dom[$key]['attribute'] = array(); // reset attribute array
- while (list($id, $name) = each($attr_array[1])) {
+ foreach ($attr_array[1] as $id => $name) {
$dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];
}
if (!empty($css)) {
@@ -16558,7 +16558,7 @@ class TCPDF {
// get style attributes
preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
$dom[$key]['style'] = array(); // reset style attribute array
- while (list($id, $name) = each($style_array[1])) {
+ foreach ($style_array[1] as $id => $name) {
// in case of duplicate attribute the last replace the previous
$dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);
}