mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-31 12:38:22 +00:00
improved (fixed) type detection
This commit is contained in:
+2
-2
@@ -165,9 +165,9 @@ class QRCode{
|
||||
][$mode];
|
||||
|
||||
$this->qrDataInterface = new $qrDataInterface($data);
|
||||
$this->typeNumber = intval($options->typeNumber);
|
||||
$this->typeNumber = $options->typeNumber;
|
||||
|
||||
if($this->typeNumber < 1 || $this->typeNumber > 10){
|
||||
if(!is_int($this->typeNumber) || $this->typeNumber < 1 || $this->typeNumber > 10){
|
||||
$this->typeNumber = $this->getTypeNumber($mode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user