mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-26 00:18:17 +00:00
:octocat: move version clamp to options
This commit is contained in:
@@ -182,7 +182,7 @@ abstract class QRDataAbstract implements QRDataInterface{
|
||||
$maxlength = 0;
|
||||
|
||||
// guess the version number within the given range
|
||||
foreach(range(max(1, $this->options->versionMin), min($this->options->versionMax, 40)) as $version){
|
||||
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]];
|
||||
|
||||
if($this->strlen <= $maxlength){
|
||||
|
||||
Reference in New Issue
Block a user