问题
I update php7.1 to php7.2.1 (PHP 7.2.1 (cli)) my laravel pdf not generated show below errorr:
(1/1) ErrorException
A non-numeric value encountered
in mpdf.php (line 30648)
at HandleExceptions->handleError(
2,
'A non-numeric value encountered',
'/opt/lampp/htdocs/mysite/vendor/mpdf/mpdf/mpdf.php',
30648,
array(
'size' => 0,
'maxsize' => 190.00155555555551245561218820512294769287109375,
'fontsize' => 3.704166666666667051543981870054267346858978271484375,
'usefontsize' => false)
)
in mpdf.php (line 30648)
回答1:
Based on the error message, you are using mPDF 6.x which is not compatible with PHP 7.2 (and not entirely with PHP 7.1 for that matter).
You should upgrade to mPDF 7 which is officially supported up to PHP 7.2.
来源:https://stackoverflow.com/questions/48984327/laravel-mpdf-non-numeric-value-encountered-errorexception-after-php-upgrade-to-7