Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

PHP 7.1 A non-numeric value encountered #21

Closed
v-wolf opened this issue Jan 14, 2017 · 6 comments
Closed

PHP 7.1 A non-numeric value encountered #21

v-wolf opened this issue Jan 14, 2017 · 6 comments

Comments

@v-wolf
Copy link

v-wolf commented Jan 14, 2017

Hi, PHP 7.1 return error:

in mpdf.php line 30648
at HandleExceptions->handleError('2', 'A non-numeric value encountered', '/.../vendor/mpdf/mpdf/mpdf.php', '30648', array('size' => '0', 'maxsize' => '190.001555556', 'fontsize' => '3.175', 'usefontsize' => false)) in mpdf.php line 30648

@splu0008
Copy link

I had the same problem, it was a img with class img-responsive. When I removed the class it worked.

@v-wolf
Copy link
Author

v-wolf commented Jan 14, 2017

I am not use any image.
Here is same problem
dompdf/dompdf#1272
dompdf/dompdf#1331 (comment)

@niklasravnsborg
Copy link
Owner

@v-wolf I think this is a dompdf specific issue and you have to watch the issues there. Anyway, can you send the code that is producing this error?

@v-wolf
Copy link
Author

v-wolf commented Jan 16, 2017

@niklasravnsborg I have one more time check my CSS and remove {position: absolute;} and this work now fine. Thanks )))

@niklasravnsborg
Copy link
Owner

Awesome 🙌

@AymanElshehawy
Copy link

The problem here is in E_WARNING exception in PHP 7:
https://stackoverflow.com/a/42044413

I solved this problem just by replacing line 89:
$errorlevel = error_reporting($errorlevel & ~E_NOTICE);
with:
$errorlevel = error_reporting($errorlevel & ~(E_NOTICE|E_WARNING));

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

No branches or pull requests

4 participants