Преглед на файлове

Fix trailing zero when not CODE_128_C

Fix trailing zero when not CODE_128_C
master
Gustavo Arnosti Neves преди 6 години
committed by GitHub
родител
ревизия
dce7413e3e
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. +3
    -3
      barcode.php

+ 3
- 3
barcode.php Целия файл

@@ -14,7 +14,7 @@

require_once 'vendor/autoload.php';

define("_BC_VERSION", "1.0.7");
define("_BC_VERSION", "1.0.8");

# default padding for cli messages
define("_BC_PADDING", 30);
@@ -340,8 +340,8 @@ function vPrint($input) {
$bc_type = constant('Picqer\Barcode\BarcodeGenerator::TYPE_'.$encoding);

// add trailling zero if odd digits on Code128C
$bc_string = strlen($bc_string) % 2 == 0 && $encoding === 'CODE_128_C'?
$bc_string : '0'.$bc_string;
$bc_string = strlen($bc_string) % 2 != 0 && $encoding === 'CODE_128_C'?
'0'.$bc_string : $bc_string;

// create appropriate generator
$generator = null;


Зареждане…
Отказ
Запис