From 47e9a8338c9276986c47b6415c703d2eb00af1e8 Mon Sep 17 00:00:00 2001 From: Renan Rodrigo Date: Wed, 25 Feb 2026 11:54:07 -0300 Subject: [PATCH] Ignore warnings about float to int casting on tcpdf_fonts The warning is being thrown in PHP 8.5, and it's breaking PDF generation in some cases, caught in tests executed on armhf systems. Fixes: #856 --- include/tcpdf_fonts.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/tcpdf_fonts.php b/include/tcpdf_fonts.php index fbe7009c..b7234d09 100644 --- a/include/tcpdf_fonts.php +++ b/include/tcpdf_fonts.php @@ -45,6 +45,12 @@ * @version 1.1.1 * @author Nicola Asuni - info@tecnick.com */ + +// Suppress warning about casting on armhf +set_error_handler(function($errno, $errstr) { + return strpos($errstr, 'is not representable as an int') !== false; +}, E_WARNING); + class TCPDF_FONTS { /**