Undefined array key “products”
-
Another, this time it’s just a backend warning but still:
PHP Warning: Undefined array key "products" in /www/isartaude_188/public/wp-content/plugins/product-add-ons-woocommerce/includes/Admin/SingleGroup.php on line 98
It’s because you try to immediately convert a variable to an array before checking its existence, making nonsense of the null coalescing operator which would only be executed afterwards.
So in includes/Admin/SingleGroup.php @ 98+99…
$group->products = array_map( 'intval', (array) $data['products'] ?? array() ); $group->categories = array_map( 'intval', (array) $data['categories'] ?? array() );
… must become:
$group->products = array_map( 'intval', isset($data['products']) ? (array) $data['products'] : array() ); $group->categories = array_map( 'intval', isset($data['categories']) ? (array) $data['categories'] : array() );
Btw, I must say that your unwillingness to fix existing bugs in this free version anymore inspires zero trust in me to be consider purchasing the premium one.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Undefined array key “products”’ is closed to new replies.