TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

2025-01-16, Trying to access array offset on int

Open Jack-Mutsers opened this issue 1 month ago • 1 comments

i just updated to the latest version of TCPDF, but now i run into this message

Message: Trying to access array offset on int Filename: tcpdf/Tcpdf.php Line Number: 11737

So i looked into it and its about this $line[$i] inside of

$border_style2 = array();
foreach ($border_style as $line => $value) {
	$length = strlen($line);
	for ($i = 0; $i < $length; ++$i) {
		$border_style2[$line[$i]] = $value;
	}
}
$border_style = $border_style2;

so apparently $line (the array key) has a chance to be an integer

Jack-Mutsers avatar Jan 16 '26 11:01 Jack-Mutsers

Can you provide an example of the code you use to trigger this? You can adjust an existing example in the examples/ folder here

williamdes avatar Jan 17 '26 09:01 williamdes