mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-31 20:48:40 +00:00
🚿
This commit is contained in:
@@ -144,8 +144,11 @@ abstract class QRDataAbstract implements QRDataInterface{
|
||||
$maxlength = 0;
|
||||
|
||||
// guess the version number within the given range
|
||||
$dataMode = QRCode::DATA_MODES[$this->datamode];
|
||||
$eccMode = QRCode::ECC_MODES[$this->options->eccLevel];
|
||||
|
||||
foreach(range($this->options->versionMin, $this->options->versionMax) as $version){
|
||||
$maxlength = $this::MAX_LENGTH[$version][QRCode::DATA_MODES[$this->datamode]][QRCode::ECC_MODES[$this->options->eccLevel]];
|
||||
$maxlength = $this::MAX_LENGTH[$version][$dataMode][$eccMode];
|
||||
|
||||
if($this->strlen <= $maxlength){
|
||||
return $version;
|
||||
|
||||
Reference in New Issue
Block a user