From e01d862b9bd3b58a7a11c6cefd241c88cac6e33a Mon Sep 17 00:00:00 2001 From: codemasher Date: Sat, 10 Mar 2018 16:31:30 +0100 Subject: [PATCH] :wrench: fixed https://github.com/chillerlan/php-qrcode/issues/12 --- src/QRCode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QRCode.php b/src/QRCode.php index 6bc64f540..96598218b 100644 --- a/src/QRCode.php +++ b/src/QRCode.php @@ -171,7 +171,7 @@ class QRCode{ $maskPattern = $this->options->maskPattern === $this::MASK_PATTERN_AUTO ? $this->getBestMaskPattern() - : max(7, min(0, (int)$this->options->maskPattern)); + : min(7, max(0, (int)$this->options->maskPattern)); $matrix = $this ->dataInterface