tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.22k stars 1.52k forks source link

Deprecated notices #544

Open r0tk1w opened 2 years ago

r0tk1w commented 2 years ago

Deprecated: Implicit conversion from float 0.5 to int loses precision in XXX/vendor/tecnickcom/tcpdf/include/barcodes/qrcode.php on line 891

ver 6.5.0 php 8.1.9

NJCLous commented 2 years ago

I temporarily resolved this by adding the line $col = (int) $col; after the existing assingment to $col in both parts of the if statement in function getCode(). This isn't elegant but it makes the float-to-int conversion explicit and avoids the deprecation notice.

Same versions of TCPDF and PHP.