In the api documentation for commerce_cart_order_new(), it states:
* @param $uid
* The uid of the user for whom to create the order. If left 0, the order will
* be created for the current user and associated with his or her session.
From what I can tell, if no uid is passed, $uid defaults to 0 which creates an order for the anonymous user, not the current user.
commerce_cart_order_new() calls commerce_order_new() but that doesn't do anything special with a $uid == 0 either...
I know we can just pass in $user->uid to be safe, but was just wondering if the documentation is correct or is the code correct?