Laravel/mPDF non-numeric value encountered ErrorException after PHP upgrade to 7.2

大兔子大兔子 提交于 2019-12-11 17:54:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!