PHP更新后保存到Wordpress数据库失败

I have upgraded my Wordpress Installation and the database its hosted on to 7.2 from 5.2. On Version 5.2 i was able to save this information successfully. Now nothing is saved at all. Is there an issue with my code in relation to the updates.

 global $wpdb;
 global $current_user;

 $table_name= $wpdb->prefix. 'product_configurator';
 $DBP_buildName =   wp_unslash( $_POST['buildName'] );
 $DBP_buildNameDecode = json_decode($DBP_buildName);
 $DBP_buildConfig = wp_unslash( $_POST['array'] );
 $enclosure = "120x120x90";
 $user_id = get_current_user_id();
 $user_name = $current_user->user_login;
 $buildNameStripped = str_replace(' ', '&', $DBP_buildNameDecode);
 $share_link = 
 "#enclosure_type=$enclosure&user_name=$user_name&build=$buildNameStripped";



  $wpdb->insert($table_name,
  array(
        'user_id' => $user_id,
        'user_name' => $user_login,
        'user_email' => $user_email,
        'enclosure_type' => $enclosure,
        'keymap_key' => $DBP_buildNameDecode,
        'key_map' => $DBP_buildConfig,
        'share_link' => $share_link


  ),
  array(
    '%s', //use for string format
    '%s',
    '%s',
    '%s',
    '%s',
    '%s',
    '%s'


  )
)