Support » Plugin: WooCommerce Custom Product Tabs Lite » PHP Fatal error – Uncaught Error: [] operator not supported for strings

  • Resolved Remco Tolsma

    (@remcotolsma)


    Hello WooCommerce Custom Product Tabs Lite developers,

    On PHP 7.1 we get the following error in the WordPress admin environment while editing a WooCommerce product:

    [Mon Mar 20 11:12:27.583687 2017] [proxy_fcgi:error] [pid 15464:tid 139724714784512] [client 95.97.219.235:49790] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: [] operator not supported for strings in /public_html/wp-content/plugins/woocommerce-custom-product-tabs-lite/woocommerce-custom-product-tabs-lite.php:200\nStack trace:\n#0 /public_html/wp-includes/class-wp-hook.php(298): WooCommerceCustomProductTabsLite->product_write_panel('')\n#1 /public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)\n#2 /public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#3 /public_html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-data.php(575): do_action('woocommerce_pro...')\n#4 /public_html/wp-admin/includes/template.php(1048): WC_Meta_Box_Product_Data::output(Object(WP_Post), Array)\n#5 /public_html/wp-admin/edit...\n', referer: /wp-admin/edit.php?post_type=product&wc-hide-notice=template_files&_wc_notice_nonce=87a9ba7165

    https://github.com/skyverge/woocommerce-custom-product-tabs-lite/blob/1.4.0/woocommerce-custom-product-tabs-lite.php#L176-L178

    This can be fixed easily with the following change:

    $tab_data[] = array( 'title' => '', 'content' => '' );

    to

    $tab_data = array( array( 'title' => '', 'content' => '' ) );

    Would be nice if you apply this in the next release!

    • This topic was modified 2 years, 1 month ago by  Remco Tolsma.
Viewing 1 replies (of 1 total)
  • Plugin Author SkyVerge

    (@skyverge)

    iterating for anyone who comes across this, as I chatted with @remcotolsma via GitHub already 🙂 — we have this patched on our end already and will be releasing an update for PHP 7.1 and WooCommerce 3.0 compatibility later in the week.

    thanks again for the report @remcotolsma!

    Cheers, Beka

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal error – Uncaught Error: [] operator not supported for strings’ is closed to new replies.