Title: Deprecated Function Error in mPDF Addon with PHP 8.2
Last modified: October 14, 2024

---

# Deprecated Function Error in mPDF Addon with PHP 8.2

 *  Resolved [ibtekarlabs](https://wordpress.org/support/users/ibtekarlabs/)
 * (@ibtekarlabs)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/deprecated-function-error-in-mpdf-addon-with-php-8-2/)
 * Hello Support Team,
 * I am encountering an error with the mPDF Addon for PDF Invoices on my WordPress
   site. After updating to PHP 8.2, I received the following message in the error
   log:
   `[14-Oct-2024 13:43:02 UTC] PHP Deprecated: strpos(): Passing null to parameter#
   1 ($haystack) of type string is deprecated in /bitnami/wordpress/wp-content/plugins/
   mpdf-addon-for-pdf-invoices/vendor/mpdf/mpdf/src/Mpdf.php on line 6560`
 * It seems that the plugin is trying to pass a null value to the `strpos()` function,
   which is not compatible with PHP 8.2. Could you please provide guidance on how
   to resolve this issue, or let me know if there is an update available that addresses
   compatibility with PHP 8.2?
 * Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [WebToffee Support](https://wordpress.org/support/users/webtoffeesupport/)
 * (@webtoffeesupport)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/deprecated-function-error-in-mpdf-addon-with-php-8-2/#post-18101458)
 * Hi [@ibtekarlabs](https://wordpress.org/support/users/ibtekarlabs/),
 * Thanks for reaching out.
 * We have fixed the issue you reported and will be included in the upcoming version
   of the plugin.
 *  Thread Starter [ibtekarlabs](https://wordpress.org/support/users/ibtekarlabs/)
 * (@ibtekarlabs)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/deprecated-function-error-in-mpdf-addon-with-php-8-2/#post-18352225)
 * Hello again,
   I just wanted to give you a quick heads-up about another small PHP
   deprecation warning I noticed 
 *     ```wp-block-code
       [09-Mar-2025 21:48:45 UTC] PHP Deprecated:  Implicit conversion from float 1093477.5 to int loses precision in /bitnami/wordpress/wp-content/plugins/mpdf-addon-for-pdf-invoices/vendor/mpdf/mpdf/src/Mpdf.php on line 15244
       ```
   
 * Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Deprecated Function Error in mPDF Addon with PHP 8.2’ is closed to new
replies.

 * ![](https://ps.w.org/mpdf-addon-for-pdf-invoices/assets/icon-256x256.png?rev=
   2598007)
 * [mPDF add-on for RTL and Unicode Support](https://wordpress.org/plugins/mpdf-addon-for-pdf-invoices/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mpdf-addon-for-pdf-invoices/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mpdf-addon-for-pdf-invoices/)
 * [Active Topics](https://wordpress.org/support/plugin/mpdf-addon-for-pdf-invoices/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mpdf-addon-for-pdf-invoices/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mpdf-addon-for-pdf-invoices/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ibtekarlabs](https://wordpress.org/support/users/ibtekarlabs/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/deprecated-function-error-in-mpdf-addon-with-php-8-2/#post-18352225)
 * Status: resolved