picqer / php-barcode-generator

Barcode generator in PHP that is easy to use, non-bloated and framework independent.
GNU Lesser General Public License v3.0
1.67k stars 402 forks source link

PHP 8.2: fix E_DEPRECATED warning #185

Closed 1234ru closed 1 year ago

1234ru commented 1 year ago
$generator = new Picqer\Barcode\BarcodeGeneratorSVG();
header("Content-type: image/svg+xml");
echo $generator->getBarcode(123, $generator::TYPE_CODE_128);

Currently the code above throws a warning:

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in src\Types\TypeCode128.php on line 159

casperbakker commented 1 year ago

@1234ru You are probably running an old version of this library, as this is fixed months ago.