• Resolved daomapsieucap

    (@daomapsieucap)


    Hi,

    I’m using the latest version 3.2.0 with PHP version 8.1 but it causes multiple error messages in the admin when I use the SVG file for the logo image.

    It keeps saying Fatal error: Division by zero

    wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/phenx/php-SVG-lib/src/Svg/Tag/Path.php (502)

    Vendor SVG has many error messages like this if you try to use the SVG file. I updated the logo to PNG now but I hope that the plugin will have an update to be compatible with PHP version 8.1.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @daomapsieucap,

    Could you please share the SVG logo image to try to replicate your case? You can use https://filebin.net/ to upload the file and share the bin URL here (it deletes the files automatically after 6 days).

    Thread Starter daomapsieucap

    (@daomapsieucap)

    Hi @yordansoares,

    I’ve uploaded the SVG here: https://filebin.net/ye11k7za89oinf15. Thanks for the quick response.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Thanks for sharing your SVG logo, @daomapsieucap!

    I have already tested, and I indeed received the same error you reported. This is a rendering issue caused by the more strict parser in PHP 8.x that our PDF engine uses (dompdf). Unfortunately, this is something we can’t fix from our side, as this is a dependency or third-party library.

    My recommendation is to continue using the PNG version of your logo for the PDF documents, or ask your designer to create a logo version for your PDF documents with simplified vectors.

    Hope it helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP 8.1 compatibility’ is closed to new replies.