mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-60237 libraries: TCPDF apply patch for PHP7.2
This commit is contained in:
parent
cbc8560718
commit
906e3fcf6e
@ -5,12 +5,15 @@ Description of TCPDF library import 6.2.13
|
||||
* remove tcpdf_import.php from composer.json
|
||||
* remove all fonts that were not already present
|
||||
* visit http://127.0.0.1/lib/tests/other/pdflibtestpage.php and view the pdf
|
||||
* check the status of https://github.com/tecnickcom/TCPDF/pull/74 and re-apply if not merged/closed
|
||||
|
||||
2017/10/02
|
||||
----------
|
||||
Upgrade to tcpdf_php5 TCPDF 6.2.13 (MDL-60237)
|
||||
by Marina Glancy <marina@moodle.com>
|
||||
|
||||
* replaced the calls to function each() deprecated in PHP7.2
|
||||
|
||||
2015/09/29
|
||||
----------
|
||||
Upgrade to tcpdf_php5 TCPDF 6.2.12 (MDL-51534)
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user