If the phone was not very hot when this happened then I would say it is a defective cable - its plug is poorly connected to its wires. But if the phone got unusually hot as well, then I would take it back to the store and expect at least a battery replacement.