Warnings on PHP 8+ when saving products
-
Hi there!
I’m getting the following warning in the PHP error log when saving a product:
PHP Warning: Undefined array key “br_labels” in …/plugins/advanced-product-labels-for-woocommerce/includes/custom_post.php on line 1107
This happens because the $_POST[‘br_labels’] key is not always set, but the plugin tries to access it directly:
$_POST[‘br_labels’] = apply_filters(‘berocket_apl_wc_save_product’, $_POST[‘br_labels’], $post_id);
To make this compatible with PHP 8+, it would be good to add a check.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Warnings on PHP 8+ when saving products’ is closed to new replies.