Plugin try to access an empty array at makewebbetter-hubspot-for-woocommerce/inc
-
My env:
WP: 6.1 MWB HubSpot for WooCommerce: 1.4.5
Plugin try to access the role of an user, but in some case, role is an empty array.
<?php // File makewebbetter-hubspot-for-woocommerce/includes/class-hubwoodatasync.php line 348 $user_data = get_user_by( 'email', $email ); $role = $user_data->roles[0];
We should check if role is empty or not before access
<?php $user_data = get_user_by( 'email', $email ); if (empty($user_data->roles)) { continue; } $role = $user_data->roles[0];
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Plugin try to access an empty array at makewebbetter-hubspot-for-woocommerce/inc’ is closed to new replies.