mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-27 10:28:57 +00:00
🚿 fewer function calls for numeric and alphanum table checks
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ final class Number extends QRDataAbstract{
|
||||
for($i = 0; $i < $len; $i++){
|
||||
$c = ord($string[$i]);
|
||||
|
||||
if(!in_array($string[$i], $this::CHAR_MAP_NUMBER, true)){
|
||||
if(!isset($this::CHAR_MAP_NUMBER[$string[$i]])){
|
||||
throw new QRCodeDataException(sprintf('illegal char: "%s" [%d]', $string[$i], $c));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user