After updating the server into the latest PHP 7.3.16, the plugin started to return messy output instead of the PDF, starting with warning message:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/davidzel/public_html/anadat-r/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php on line 25892
Warning: Cannot modify header information - headers already sent by (output started at /home/davidzel/public_html/anadat-r/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php:25892) in /home/davidzel/public_html/anadat-r/lib/plugins/dw2pdf/action.php on line 547
Seems like a compatibility issue of "count" function which has a more strict definition in the latest PHP, unfortunately, I have no idea how this can be fixed (perhaps updating new MPDF library source?). After changing back to PHP 7.1.33, it works fine again (version PHP 7.2.29 returns the same error).
After updating the server into the latest PHP 7.3.16, the plugin started to return messy output instead of the PDF, starting with warning message:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/davidzel/public_html/anadat-r/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php on line 25892
Warning: Cannot modify header information - headers already sent by (output started at /home/davidzel/public_html/anadat-r/lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Mpdf.php:25892) in /home/davidzel/public_html/anadat-r/lib/plugins/dw2pdf/action.php on line 547
Seems like a compatibility issue of "count" function which has a more strict definition in the latest PHP, unfortunately, I have no idea how this can be fixed (perhaps updating new MPDF library source?). After changing back to PHP 7.1.33, it works fine again (version PHP 7.2.29 returns the same error).