Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/tcpdf_fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I was not expecting such a patch
it does not fix it but hides the warning
I guess some debuting is needed to fix it for real?
Or this error suppression could be done around the problematic lines?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well yep.
This is ignoring the error just for the sake of the Ubuntu transition to PHP8.5, so we are not blocked, but the bug is still there - and it was there before, PHP is just complaining about it now...

I fear I don't have enough context to have a good solution for this issue soon, but I can look further in the future.

One thing I ended up doing for other packages is limiting it to 32bit PHP (by wrapping it in a check on PHP_INT_SIZE)

return strpos($errstr, 'is not representable as an int') !== false;
}, E_WARNING);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from that, I would prefer not to keep a diff in Ubuntu
can you send your patch in Debian salsa?
so you can sync the version afterwards

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing: once we agree on a good patch I can send it in salsa too (:


class TCPDF_FONTS {

/**
Expand Down