• Resolved mahi38

    (@mahi38)


    Hello,
    Thanks for this great plugin !
    I get the following endless warnings in the Apache error.log when generating invoices – does anybody know how to fix the issue ?
    thanks a lot

    [07-Mar-2017 15:18:39 UTC] PHP Warning:  Illegal string offset 'ID' in /home/arkanova/public_html/wp_33/wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
    [07-Mar-2017 15:18:39 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/arkanova/public_html/wp_33/wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1302
    [07-Mar-2017 15:18:39 UTC] PHP Warning:  Illegal string offset 'LANG' in /home/arkanova/public_html/wp_33/wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
    [07-Mar-2017 15:18:39 UTC] PHP Warning:  Cannot assign an empty string to a string offset in /home/arkanova/public_html/wp_33/wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1307
    [07-Mar-2017 15:18:39 UTC] PHP Warning:  Illegal string offset 'ID' in /home/arkanova/public_html/wp_33/wp-content/plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php on line 1355
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mahi38

    (@mahi38)

    OK – I understand function MergeCSS() is called in mpdf.php with $attr being ”, so statements like :
    – $attr[‘ID’] = ”; // line 1302 in cssmgr.php
    – $attr[‘LANG’] = ”; // line 1307
    are generating warnings Cannot assign an empty string to a string offset… in PHP 7.1.2

    I fixed the problem in adding the following 3 lines in :
    file : plugins/woocommerce-pdf-invoices/lib/mpdf/classes/cssmgr.php
    function : MergeCSS($inherit, $tag, $attr)
    after : $zp = array(); // line 1295

    if (! is_array($attr)) {
        $attr = array();
    }

    If this is the correct code to solve the problem it would be nice to have the fix integrated in the next release.

    The plugin is great – let’s keep up with the good work.

    cheers

    Plugin Author Bas Elbers

    (@baaaaas)

    I am aware of this issue. It is related to PHP 7.1. Will update plugin as soon as possible.

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

The topic ‘problem with cssmgr.php in apache error.log’ is closed to new replies.