When trying your implementation on a PHP 8.1.3. webserver, this fatal error is thrown:
Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /var/www/html/vendor/labels/AveryTemplates.class.php:203 Stack trace: #0 /var/www/html/vendor/labels/AveryTemplates.class.php(203): implode() #1 /var/www/html/actions/labelPrintAuto2.php(24): amattu\Avery_5160->build() #2 {main} thrown in /var/www/html/vendor/labels/AveryTemplates.class.php on line 203
Please note that, as of PHP 8.0, the implode()
method has this signature:
implode(string $separator, array $array): string
instead of the old:
implode(array $array, string $separator): string
(deprecated as of PHP 7.4.0 and now removed).
You may want to adapt your code. A pull request has been submitted. #2