chillerlan / php-qrcode

A PHP QR Code generator and reader with a user-friendly API.
https://smiley.codes/qrcode/
Apache License 2.0
2.01k stars 302 forks source link

code length overflow. (2196 > 2192 bit) #237

Closed wadealer closed 9 months ago

wadealer commented 9 months ago

When QR code rendered exception acquired code length overflow. (2196 > 2192 bit).

$config = [ 'level' => 40, 'eccLevel' => EccLevel::L, ];

What should I do to avoid this error?

codemasher commented 9 months ago

Hi, first off, the option "level" doesn't exist - i assume you mean "version". Second, it seems to me that the contrary to the above snippet, the version is fixed/limited to 10 (which has a maximum capacity of 2192 bits, see Information capacity and versions of the QR Code). Simply remove the "version" setting, so that auto detection can work.