This is most likely the fault of the battery and not the charger. This happens when people don't properly run their laptops through the charge cycles recommended. As long as the laptop can see that there's a battery there it means that there should be no hardware fault with the laptop. This happens after long usage of laptops as well, because the batteries wear out and lose their charge.
Unfortunately there's nothing much you can do apart from replace the battery. This might be an expensive solution depending on the model of your laptop, so it might just be worthwhile upgrading your laptop and getting a new one if it costs more than $200.
-------
Intelligence is the ability to avoid doing work, yet getting the work done.