• Resolved thelouie

    (@thelouie)


    When a product has no tabs the $tabs argument to video_product_tabs() is null in WooCommerceIntegrationFrontend.php and causes an exception in the array_multisort() call on line 28.

    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/woocommerce-html5-video/WooCommerceIntegrationFrontend.php on line 25 Warning: array_multisort(): Argument #3 is expected to be an array or a sort flag in /var/www/html/wp-content/plugins/woocommerce-html5-video/WooCommerceIntegrationFrontend.php on line 28 Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/woocommerce-html5-video/WooCommerceIntegrationFrontend.php on line 41

    Adding the following to the top of the funtion mitigates the problem:
    if ($tabs === null) { $tabs = []; }

Viewing 1 replies (of 1 total)
  • Plugin Author Webilop

    (@webilop)

    Thanks for the report. We have released a new version with the fix and tested up to WP 5.2.

    Again, thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘WooCommerceIntegrationFrontend.php: argument to video_product_tabs can be null’ is closed to new replies.