TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

Undefined offset: -1

Open gemal opened this issue 1 year ago • 5 comments

using version 6.6.2

if you call MultiCell with the following text: Festival - ​​​​​​​Vi glæder os til at feste med jer!

note that in this string are some zero with spaces: https://en.wikipedia.org/wiki/Zero-width_space

image

you get: Undefined offset: -1

stacktrace: vendor\tecnickcom\tcpdf\tcpdf.php:6292 vendor\tecnickcom\tcpdf\tcpdf.php:6355 vendor\tecnickcom\tcpdf\tcpdf.php:5942

gemal avatar Mar 29 '23 11:03 gemal

if it helps perhaps I somehow can make a test case out of this?

gemal avatar Mar 29 '23 11:03 gemal

if it helps perhaps I somehow can make a test case out of this?

For sure ! You can create an example file like this one: https://github.com/tecnickcom/TCPDF/blob/main/examples/example_066.php If it reproduces the bug you can create a PR for it (and it's fix ?)

williamdes avatar Mar 29 '23 11:03 williamdes

example_069.txt

test file

gemal avatar Apr 17 '23 14:04 gemal

how can I continue on this? how do I run the unit tests?

gemal avatar Jun 07 '23 14:06 gemal

how can I continue on this? how do I run the unit tests?

Hi, my appologies for not replying ealier The best is to create a pull-request and put the example file in it, the tests will be run automatically And we can discuss on it quicker

williamdes avatar Jun 07 '23 15:06 williamdes