Fatal error: Switch statements may only contain one default clause in mpdf.php

北战南征 提交于 2019-12-06 03:52:40

Old mpdf versions don't support PHP7, unfortunately (mpdf issue). You can either:

  1. Switch to actual mpdf version and use this workaround for chinese fonts;
  2. Or change your live server PHP to 5.6 (PHP RFC multiple default cases syntax error);
  3. Or fix this switch issue in mpdf source yourself (people discussed the possible solution in this hhvm issue), you just need to remove one of the default statements.

Older post but this may help someone, I had the same issue moving a site from PHP 5.6 to PHP 7, I have found an updated version of MPDF which works fine for me at https://github.com/kbs1/mpdf-5.7-php7

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