• Resolved ahuei

    (@gas1123)


    1. Hi Booster Support, We are experiencing a high-frequency PHP Warning on our site running Booster Plus for WooCommerce v7.2.3 with PHP 8.3. Error:PHP Warning: Undefined array key "standard" in /wp-content/plugins/booster-plus-for-woocommerce/includes/shortcodes/class-wcj-orders-shortcodes.php on line 254Environment:
      • Booster Plus for WooCommerce: 7.2.3 (latest)
      • PHP: 8.3
      • WordPress: 7.0.4
      • WooCommerce: 9.8.7
      • Hosting: Pressable
      Frequency: 900+ warnings per week (triggered every time [wcj_order_items_table] is rendered in PDF invoices/emails) Root Cause: Line 254 performs: $atts['standard'] = wcj_sanitize_input_attribute_values( $atts['standard'] ); The standard key is not defined in the shortcode’s $defaults array, so when [wcj_order_items_table] is called without explicitly passing standard="", the key does not exist in $atts. In PHP 7.x this was silently ignored; in PHP 8.x it triggers an “Undefined array key” warning. Note: The standard attribute is not listed in your official documentation at https://booster.io/docs/category-orders/ — it appears to be an internal key that was never registered in the shortcode defaults. Suggested Fix:// Change line 254 from: $atts['standard'] = wcj_sanitize_input_attribute_values( $atts['standard'] ); // To: $atts['standard'] = wcj_sanitize_input_attribute_values( $atts['standard'] ?? '' ); Or add 'standard' => '' to the shortcode’s $atts defaults array so it is always defined. Impact:
      • Error logs are flooded (40%+ of all warnings)
      • Masks other legitimate errors in logs
      • No functional breakage for end users, but degrades log readability and increases disk I/O
    2. Could you please confirm this will be patched in the next release? In the meantime, we will apply the ?? '' fix locally. Thank you.
Viewing 1 replies (of 1 total)
  • Plugin Contributor David G

    (@gravid7)

    Hi,

    Thank you for reporting this issue and for providing the detailed error information.

    Our current latest version is Booster Plus for WooCommerce v8.3.0. Please update the plugin to v8.3.0 and check the issue again.

    After updating, please let us know if you are still experiencing the same warning. If the issue persists, please share the latest error log with us so we can investigate it further.

    Thank you!

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.