1 (edited by notrinos 10/25/2018 02:19:54 pm)

Topic: Fixed deprecated each() function in PHP 7.2

The using function each() in tcpdf.php is deprecated since php7.2

tcpdf.php need to be modified:

line: 4693

while (list($file, $info) = each($this->images)) 

to be

foreach ($this->images as $file => $info) 

line: 7768

while (list($key, $val) = each($prop)) 

to be

foreach ($prop as $key => $val) 

line: 9242

while (list($id, $name) = each($attr_array[1])) 

to be

foreach ($attr_array[1] as $id => $name) 

line: 9250

while (list($id, $name) = each($style_array[1])) 

to be

foreach ($style_array[1] as $id => $name) 
Phuong

Re: Fixed deprecated each() function in PHP 7.2

Thanks @notrinos. Will commit this later.

Joe

Re: Fixed deprecated each() function in PHP 7.2

This has now been committed to stable. Fixed file can be downloaded here.

/Joe

Re: Fixed deprecated each() function in PHP 7.2

Please do the same for fpdi/fpdi.php

Re: Fixed deprecated each() function in PHP 7.2

This has been committed. The fixed file can be downloaded here.

/Joe