mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-05 15:08:36 +00:00
✨ use module values or fall back to defaults
This commit is contained in:
@@ -42,9 +42,15 @@ class QRString extends QROutputAbstract{
|
||||
|
||||
foreach($this->matrix->matrix() as $row){
|
||||
foreach($row as $col){
|
||||
$str .= $col >> 8 > 0
|
||||
? $this->options->textDark
|
||||
: $this->options->textLight;
|
||||
$col = $this->options->moduleValues[$col];
|
||||
|
||||
// fallback
|
||||
if(is_bool($col) || !is_string($col)){
|
||||
$col = $col ? $this->options->textDark : $this->options->textLight;
|
||||
}
|
||||
|
||||
|
||||
$str .= $col;
|
||||
}
|
||||
|
||||
$str .= $this->options->eol;
|
||||
|
||||
Reference in New Issue
Block a user