Yes. It is failure of Power Management Circuitry. A common place for this fault is a simple short due to dirt or debris in charging port. Clean the iPhone charging port with a clean dry toothbrush. See if better. If still problem, and there is Warranty or AppleCare make Genius reservation and take to Apple for resolution. If no coverage, clean charging port again with toothbrush and small amount of Isopropyl Alcohol.