The court had to correct the illegal sentence. However it's not clear from your question whether he was offered his plea back; or if this would have helped him. This is usually what the court will do when the agreed upon sentence is illegal.
Answered on Sep 10th, 2013 at 4:52 PM