Undefined offset: 1 while registering user from Services

Hi, We had a script which was registering user through Server Side script which looks like this

$options = [];
$options['headers'] = [];
$options['headers']['X-DreamFactory-Api-Key'] = $platform['session']['api_key'];
$options['headers']['X-DreamFactory-Session-Token'] = $platform['session']['session_token'];
$options['headers']['Content-Type'] = 'application/json';


$api = $platform["api"];
$post = $api->post;

$userData = [
              'last_name' => "string",
              'first_name' => "string",
              'email' => "someemail",
              'display_name' => "string"
        ];
        
$insertResponse = $post('user/register',$userData,$options);

The above code was working till we upgraded DF, now we are always getting Undefined offset: 1, not able to get pointers what could be causing this? Strangely everything else is working as before, but only register is not working.

Looking for Help.