improved (fixed) type detection

This commit is contained in:
smiley
2017-02-26 16:09:58 +01:00
parent 16e889d0ca
commit 04bd4a86c5
+2 -2
View File
@@ -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);
}