Undefined array key “standard” in class-wcj-orders-shortcodes.
-
- 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
[wcj_order_items_table]is rendered in PDF invoices/emails) Root Cause: Line 254 performs:$atts['standard'] = wcj_sanitize_input_attribute_values( $atts['standard'] );Thestandardkey is not defined in the shortcode’s$defaultsarray, so when[wcj_order_items_table]is called without explicitly passingstandard="", 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: Thestandardattribute 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$attsdefaults 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
- Could you please confirm this will be patched in the next release? In the meantime, we will apply the
?? ''fix locally. Thank you.
- 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:
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.