mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-17 16:31:13 +00:00
🚿
This commit is contained in:
@@ -77,7 +77,7 @@ final class MaskPattern{
|
||||
*/
|
||||
public function __construct(int $maskPattern){
|
||||
|
||||
if((0b111 & $maskPattern) !== $maskPattern){
|
||||
if(($maskPattern & 0b111) !== $maskPattern){
|
||||
throw new QRCodeException('invalid mask pattern');
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ class QRMatrix{
|
||||
$ix += $x;
|
||||
$iy += $y;
|
||||
|
||||
// $M_TYPE is given, skip if the field is not the same type
|
||||
// check if the field is the same type
|
||||
if($M_TYPE !== null && !$this->checkType($ix, $iy, $M_TYPE)){
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user