- Issue created by @srjosh
- Merge request !24Issue #3487634 by srjosh: FieldFormatter throwing error with tecnickcom/tc-lib-barcode 2.3 β (Open) created by srjosh
TypeError: Com\Tecnick\Barcode\Barcode::getBarcodeObj(): Argument #3 ($width) must be of type int, string given, called in /webroot/web/modules/contrib/barcodes/src/Plugin/Field/FieldFormatter/Barcode.php on line 291 in Com\Tecnick\Barcode\Barcode->getBarcodeObj() (line 101 of/webroot/vendor/tecnickcom/tc-lib-barcode/src/Barcode.php).
Version 2.3 of tecnickcom/tc-lib-barcode updated the `getBarcodeObj` method to require integers for width and height.
Composer require module, ensure it's downloading tecnickcom/tc-lib-barcode 2.3. Enable and configure a QR code.
Error will be thrown on display of QR code.
Cast width and height to (int) in FieldFormatter/Barcode.php::viewElements().
Active
2.1
Code