Skip to content
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

PHP7.3, A non-numeric value encountered #185

Closed
marlboroman3 opened this issue Feb 19, 2020 · 4 comments
Closed

PHP7.3, A non-numeric value encountered #185

marlboroman3 opened this issue Feb 19, 2020 · 4 comments

Comments

@marlboroman3
Copy link

marlboroman3 commented Feb 19, 2020

With latest clone today ...

Severity: Warning
Message: A non-numeric value encountered
Filename: tcpdf/tcpdf.php
Line Number: 5398

Seems $this->textstrokewidth is FALSE, fails in a multiplication.

Setting it to 0 in this case doesn't break anything for me.

@marlboroman3 marlboroman3 changed the title PHP7.3, PHP7.3, A non-numeric value encountered Feb 19, 2020
@nicolaasuni
Copy link
Member

I s this now fixed?

@d-salerno
Copy link
Contributor

this seems to still happen. I'm not sure where $this->textstrokewidth is being set, but inside the function getCellCode it is non numeric. Something like:

if(!is_numeric($this->textstrokewidth)){
   $this->textstrokewidth = 0;
}
$s .= sprintf('BT %d Tr %F w ET ', $this->textrendermode, ($this->textstrokewidth * $this->k));

fixes the issue.

@williamdes
Copy link
Contributor

Can you open a pull request ?

@d-salerno
Copy link
Contributor

sure, here's the PR: 627

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants