-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Ignore warnings about float to int casting on tcpdf_fonts #857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 { | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)