Closed cscrewsandcaptains closed 2 years ago
Having the same problem here after upgrading to PHP 8.1:
{"name":"PHP Deprecated Warning","message":"Implicit conversion from float 16.666666666666668 to int loses precision","code":8192,"type":"yii\\base\\ErrorException","file":"/app/vendor/bacon/bacon-qr-code/src/BaconQrCode/Encoder/MaskUtil.php","line":223...
I forked the project to create a pr but realized that the fix is already on master. It's just a matter of tagging and pushing the tag.
That is already in 2.0.7. In fact, that change was released 11 months ago.
Yeah, so the problem is really in "2amigos/qrcode-library" that's locking this project in ~1.1. Thanks!
oh sorry, rafaelmiti is right the library "2amigos/qrcode-library" is the problem. This library seems to be outdated (last release 2 years ago) (I now use: https://github.com/chillerlan/php-qrcode)
public static function getDataMaskBit($maskPattern, $x, $y) { ... case 4: $intermediate = (BitUtils::unsignedRightShift($y, 1) + ($x / 3)) & 0x1;
the term $x / 3 must not be an integer. Can you please round the term?