Title: PHP Warning &#8220;Illegal string offset&#8221;
Last modified: January 10, 2017

---

# PHP Warning “Illegal string offset”

 *  [d7ac](https://wordpress.org/support/users/d7ac/)
 * (@d7ac)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-3/)
 * Hi,
 * I am using the latest versions of WordPress, Woocommerce, and PDF Invoices,
    
   unfortunately since the recent updates I have been getting PHP warnings in my
   errorlog. PDFs are created and sent, but these warnings are filling up my errorlog.
   Love the plugin, very clean, friendly and easy to use!
 * Full list of warnings generated on a single purchase:
 *     ```
       [10-Jan-2017 14:32:38 UTC] PHP Warning:  A non-numeric value encountered in /home/.../wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php on line 501
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'ID' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       [10-Jan-2017 14:32:40 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/.../wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * (@baaaaas)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-3/#post-8639221)
 * These are mPDF warnings, because mPDF’s stable release isn’t compatible with 
   PHP 7.1 as stated [here](https://github.com/mpdf/mpdf/issues/163).
 * I have two choices.
    1. Use the development branch and probably get a lot more
   trouble, because the branch requires gd module and PHP 5.6+. 2. Stick to version
   mPDF 6.x and wait until the development branch has a stable release and hoping
   that WordPress doesn’t support PHP version 5.5 and older any more.
 * Created an [issue ](https://github.com/baselbers/woocommerce-pdf-invoices/issues/133)
   and am following the development of mPDF 7.x very closely.
    -  This reply was modified 9 years, 4 months ago by [Bas Elbers](https://wordpress.org/support/users/baaaaas/).
    -  This reply was modified 9 years, 4 months ago by [Bas Elbers](https://wordpress.org/support/users/baaaaas/).

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning “Illegal string offset”’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices/assets/icon-128x128.png?rev=1128583)
 * [Invoices for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)
 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bas Elbers](https://wordpress.org/support/users/baaaaas/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-3/#post-8639221)
 * Status: not resolved