Skip to content

Commit 47e9a83

Browse files
committed
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
1 parent 7a27012 commit 47e9a83

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

include/tcpdf_fonts.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
* @version 1.1.1
4646
* @author Nicola Asuni - info@tecnick.com
4747
*/
48+
49+
// Suppress warning about casting on armhf
50+
set_error_handler(function($errno, $errstr) {
51+
return strpos($errstr, 'is not representable as an int') !== false;
52+
}, E_WARNING);
53+
4854
class TCPDF_FONTS {
4955

5056
/**

0 commit comments

Comments
 (0)