PHP error – handle variations
-
When variation groups are not used.
$variations_groups = filter_input( INPUT_POST, ‘asp-variations-group-names’, FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY );
The value obtained in $variations_groups is an empty array as shown below.
array(1) (
[0] = (string)
)This has been determined to have a variation group.
Then I get a PHP error.
Fatal error: Uncaught Error: array_values(): Argument #1 ($array) must be of type array, null given
in C:\xampp82\htdocs\wordpress\wp-content\plugins\stripe-payments\admin\includes\class-asp-admin-product-meta-boxes.php on line 1057Call stack:
array_values()
wp-content/plugins/stripe-payments/admin/includes/class-asp-admin-product-meta-boxes.php:1057ASP_Admin_Product_Meta_Boxes::save_product_handler()
wp-includes/class-wp-hook.php:324WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:348WP_Hook::do_action()
wp-includes/plugin.php:517do_action()
wp-includes/post.php:4749wp_insert_post()
wp-includes/post.php:4862wp_update_post()
wp-admin/includes/post.php:453edit_post()
wp-admin/post.php:227
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘PHP error – handle variations’ is closed to new replies.