delivered the opinion of the court:
Defendant, Gilbert E. Taylor, pleaded guilty to aggravated battery (720 ILCS 5/12 — 4(a), (e) (West 2002)), a Class 3 felony, and criminal trespass to a residence (720 ILCS 5/19 — 4(a)(2), (b)(2) (West 2002)), a Class 4 felony, and was sentenced to 30 months’ probation. Later, the trial court revoked his probation and imposed concurrent extended-term sentences of 10 years’ imprisonment with credit for 436 days served. After the trial court declined to reconsider the sentences, defendant appealed.
On appeal, defendant contends that (1) the extended-term sentences must be vacated because the record does not show that, when he pleaded guilty, he knew that extended-term sentencing was possible for either offense; (2) he was ineligible for an extended-term sentence for criminal trespass to a residence; (3) even if he was eligible for an extended-term sentence for criminal trespass to a residence, the sentence imposed exceeds the statutory maximum; and (4) he is entitled to an extra day of credit for time served against his sentences. The State confesses error on all but the first contention. We vacate the extended-term sentences, impose the maximum nonextended-term sentences, grant defendant an extra day of sentencing credit, and otherwise affirm the judgment.
On January 12, 2004, at a hearing at which Judge Kathryn E. Zenoff presided, the parties presented an agreement under which defendant would plead guilty to aggravated battery and criminal trespass to a residence, the State would dismiss a charge of home invasion (720 ILCS 5/12 — 11(a)(2) (West 2002)), and the parties would recommend a sentence of 30 months’ probation. In the course of admonishing defendant, Judge Zenoff recited the charge of aggravated battery, then stated:
“That is a Class 3 felony. That is punishable by probation and a term in the Winnebago County Jail of up to 6 months and a fine up [sic] $25,000.
It is also punishable by a term in prison of 2 to 5 years in the Department of Corrections. If extended term applies, it’s 2 to 10 years. The period of parole, mandatory supervised release, is one year. Do you understand the range of penalty [sic]?”
After defendant responded, “Yes,” Judge Zenoff recited the charge of criminal trespass to a residence and stated:
“That is a Class 4 felony. That is also a probational offense. The probation can be accompanied by up to six months in the Winnebago County Jail and fined [sic] up to $25,000. The period of parole, mandatory supervised release, is one year.
If extended term applies, the term is instead of 1 to 3 years in prison, it’s 1 to 6 years in prison. Do you understand that?”
After defendant responded affirmatively, the court heard the factual basis for the plea. Judge Zenoff then asked whether defendant had any prior convictions. The assistant State’s Attorney stated that, in January 2003, defendant was fined for a misdemeanor conviction of resisting a peace officer and that, “according to a pretrial services report dated September 29, 2003, the defendant was in prison in 1999 for Possession of a Controlled Substance, a Class 4 felony, with a parole violation in 2002 it looks like.” Defendant’s counsel agreed with this summary. Judge Zenoff admonished defendant further as required (see 177 Ill. 2d R. 402) and sentenced him to 30 months’ probation per the plea agreement.
On June 1, 2004, the State petitioned to revoke defendant’s probation. On December 23, 2004, the trial court, Judge Joseph G. McGraw presiding, held an evidentiary hearing and found that defendant had violated his probation. The cause proceeded to a sentencing hearing before Judge McGraw on March 22, 2005. Defendant’s attorney, Kunal Kulkarni, who had not represented defendant at the guilty-plea hearing, referred the court to the presentencing investigation report (PSIR), particularly its summary of defendant’s prior convictions. The PSIR states that, on January 27, 1997, defendant was fined for “Use of Metal Point Bullets.”
According to Kulkarni, the PSIR seemed to imply that this offense was a Class 2 felony, but defendant claimed that it was a misdemeanor. Kulkarni said that he was uncertain whether defendant was “ultimately extended term eligible in this case.” He added that he had spoken with officials of the Department of Corrections (DOC) and ascertained that defendant had prior convictions of “both a Class 2 and a Class 4.” Thus, as Kulkarni “had attempted to explain to [defendant],” defendant was “extended term eligible on a Class 3, so that is an issue as far as the sentencing parameters go. That’s what we wish to raise to the Court.” The assistant State’s Attorney, Michael Combs, told the court that the DOC had informed him that, in case No. 99 — CR—41301, defendant had been sentenced to concurrent three-year terms “for a Class 2 and Class 4 felony.” Combs conceded that “Use of Metal Point Bullets” appeared to have been a misdemeanor. Judge McGraw agreed with Kulkarni and Combs that defendant’s criminal record needed clarification. After a witness testified in aggravation, the hearing was continued.
The next day, after two witnesses testified in mitigation, Combs told the court that, in cases Nos. 99 — CR—41301 and 98 — CR— 1828001, defendant had received concurrent three-year prison terms for a Class 2 felony and a Class 4 felony, respectively. Kulkarni commented that, in the present case, Kulkarni did not know whether “at the time [defendant] entered into this plea for aggravated battery *** [defendant] did know whether or not he was extended term eligible.” At a short hearing on April 1, 2005, Kulkarni and Combs agreed that, under People v. Eisenberg, 109 Ill. App. 3d 98 (1982), defendant could not receive an extended-term sentence if he had not been admonished before pleading guilty that extended-term sentencing was possible.
On April 22, 2005, the cause proceeded to sentencing. In pronouncing the sentences, Judge McGraw stated in part:
“I do find that he is eligible for extended term. I do find that at the time he pled guilty to this offense, he was placed on probation, he was advised of the range of extended term penalties. He knew what his criminal record was at the time he pled guilty to this offense, even if for some reason the prosecutor and the defense attorney either didn’t know or didn’t accurately articulate the extent of his prior record. But at the time that he pled guilty he had those Cook County convictions. And for whatever reason, that was not known to the State’s Attorney. But he was eligible. The point is he was told that — told that if you are eligible this is the sentencing range, and I believe that’s what the statute requires.”
Concluding that defendant’s criminal history was “extremely serious,” Judge McGraw sentenced him to concurrent 10-year prison terms, with credit for 436 days served in custody.
Defendant moved to reconsider, asserting that, when he pleaded guilty, “all parties believed” that he was ineligible for extended-term sentencing. Thus, he argued, based on Eisenberg, the extended-term sentences were improper. Judge McGraw disagreed, explaining that, when defendant pleaded guilty, he knew that he had a conviction of a Class 2 felony, and Judge Zenoff admonished him “what the range of penalties would be if he was extended term eligible.” Defendant appealed.
On appeal, defendant argues that (1) his extended-term sentences must be vacated because, when he pleaded guilty, he was not properly admonished that extended-term sentencing was possible; (2) even if extended-term sentencing was proper, the trial court erred in imposing an extended-term sentence on the conviction of criminal trespass to a residence; (3) even if extended-term sentences for both convictions were proper, the 10-year sentence for criminal trespass to a residence exceeds the statutory maximum of 6 years and must be reduced to 6 years; and (4) he is entitled to an extra day of credit for time that he spent in custody before he was sentenced. We hold that (1) defendant was ineligible for extended-term sentencing on either conviction; (2) defendant’s second and third claims of error are therefore moot; and (3) defendant is entitled to an extra day of sentencing credit.
Defendant contends first that the trial court erred in imposing extended-term sentences after revoking his probation. Defendant relies on section 5 — 8—2(b) of the Unified Code of Corrections (Code), which states, “If the conviction was by plea, it shall appear on the record that the plea was entered with the defendant’s knowledge that [an extended-term sentence] was a possibility. If it does not so appear on the record, the defendant shall not be subject to such a sentence unless he is first given an opportunity to withdraw his plea without prejudice.” 730 ILCS 5/5 — 8—2(b) (West 2004). Defendant contends that this case is controlled by Eisenberg’s construction and application of section 5 — 8—2(b). We agree.
In Eisenberg, the defendant pleaded guilty to two offenses and was sentenced to 12 months of periodic imprisonment. Three months later, the State petitioned to revoke his periodic imprisonment. The trial court granted the petition and sentenced the defendant to an extended term on the more serious offense. On appeal, the defendant contended that, under section 5 — 8—2(b) of the Code, the extended term was improper because, when he pleaded guilty, the trial court did not inform him that an extended-term sentence was possible. The appellate court agreed, vacated the extended sentence, and remanded the cause for sentencing in accordance with section 5 — 8—2(b) of the Code. Eisenberg, 109 Ill. App. 3d at 100.
We note that section 5 — 8—2(b) of the Code requires that, for an extended sentence to be imposed on a guilty plea, “it shall appear on the record that the plea was entered with a defendant’s knowledge that [an extended-term sentence] was a possibility.” 730 ILCS 5/5— 8 — 2(b) (West 2004). Thus, section 5 — 8—2(b) does not explicitly require the trial court to admonish a defendant that an extended-term sentence is a possibility. However, the Eisenberg court sensibly presumed that, absent such an admonishment, the defendant did not know that extended-term sentencing was possible. Eisenberg, 109 Ill. App. 3d at 100. Section 5 — 8—2(b) does not place the burden on the defendant to establish that he did not know that extended-term sentencing was possible; instead, it requires that the record show that he did know of such a possibility. Thus, the reviewing court in Eisenberg concluded, absent any indication otherwise, that the defendant pleaded guilty without knowing that he was eligible for extended-term sentencing. Eisenberg, 109 Ill. App. 3d at 100.
We also agree with the Eisenberg court that, when an extended-term sentence is imposed after the revocation of a lesser punishment such as probation, the proper remedy is to vacate the extended-term sentence so that a nonextended-term sentence may be imposed. Section 5 — 8—2(b) of the Code does not explicitly provide for such a remedy. It states that, if the defendant does not receive the proper admonishments, he shall not be subject to an extended-term sentence unless he is first allowed to withdraw his plea without prejudice. 730 ILCS 5 — 8—2(b) (West 2004). Thus, if a defendant is originally sentenced to an extended term without having received the proper admonishments, his remedy is to move to withdraw his guilty plea. See People v. Cavins, 288 Ill. App. 3d 173, 180 (1997). However, if the trial court does not initially sentence the defendant to an extended term, but does so only after the revocation of his periodic imprisonment (as in Eisenberg) or probation (as here), the statutory remedy is unavailable. In a probation-revocation proceeding, the defendant may not challenge the basis of the underlying conviction. People v. Dieterman, 243 Ill. App. 3d 838, 841 (1993). Thus, we agree with Eisenberg that the proper remedy is to vacate the extended-term sentence so that the defendant may be sentenced in accordance with the admonishments that he received before he pleaded guilty.
We now apply Eisenberg to this case. The record does not show that, at the guilty-plea hearing, defendant was admonished that an extended-term sentence was possible. Judge Zenoff told defendant that his conviction of aggravated battery was “punishable by a term in prison of 2 to 5 years in the Department of Corrections. If extended term applies, it’s 2 to 10 years.” (Emphasis added.) Similarly, in admonishing defendant about the potential sentence for criminal trespass to a residence, Judge Zenoff stated, “If extended term applies, the term is *** 1 to 6 years in prison.” (Emphasis added.) Thus, Judge Zenoff did not inform defendant that he was eligible for extended-term sentencing; she merely stated that, if he were eligible, certain penalties could follow. This type of conditional, tentative admonishment leaves a defendant to speculate whether an extended-term sentence is indeed possible in his case. Therefore, it does not establish that section 5 — 8—2(b) of the Code has been satisfied.
Moreover, the remainder of the record not only fails to rebut the presumption that defendant did not know that extended-term sentencing was possible; it reinforces the presumption. At the guilty-plea hearing, even the attorneys and the trial judge expressed uncertainty about defendant’s prior convictions, which provided whatever basis existed for the extended-term sentences that were imposed later. Even at resentencing, the parties and the trial judge apparently did not realize that defendant’s prior convictions included a Class 2 felony. (Without this conviction, defendant would not have been eligible for an extended-term sentence on the Class 3 felony of aggravated battery. See 730 ILCS 5/5 — 5—3.2(b)(1) (West 2004).) Moreover, Kulkarni told the court that, even after defendant had pleaded guilty and been sentenced to probation, Kulkarni had “attempted to explain” to defendant that an extended-term sentence for aggravated battery was possible. The proceedings at the guilty-plea hearing and afterward do not suggest that, when he pleaded guilty, defendant knew that he could receive an extended-term sentence. Indeed, the record creates doubt that, when defendant pleaded guilty, anyone realized that he was eligible for extended-term sentencing.
Judge McGraw’s observation that defendant always knew that he had a Class 2 felony conviction may have been accurate, but it was beside the point. That defendant knew of his Class 2 felony conviction does not imply that he knew the legal consequences of the conviction. To presume such legal expertise on the part of a defendant would vitiate section 5 — 8—2(b) of the Code and, more generally, imply that a trial court need not admonish a defendant who pleads guilty about the possible penalties that he faces. Of course, the law is otherwise. See 177 Ill. 2d R 402(a)(2).
The record does not demonstrate that, when he pleaded guilty, defendant knew that extended-term sentencing was a possibility. Therefore, in accordance with Eisenberg, we vacate defendant’s extended-term sentences. Under the circumstances, it is not necessary to remand the cause to the trial court for resentencing. The record establishes that Judge McGraw intended to impose the maximum available sentence for each conviction. Thus, under Supreme Court Rule 615(b)(4) (134 Ill. 2d R. 615(b)(4)), we reduce defendant’s concurrent sentences to the maximum nonextended terms, five years for aggravated battery and three years for criminal trespass to a residence.
Because we vacate both extended-term sentences, we need not consider defendant’s arguments that he could not receive extended-term sentences on both convictions and that his extended-term sentence for criminal trespass to a residence exceeds the statutory maximum.
Finally, defendant contends that he is entitled to an extra day of sentencing credit, for a total of 437 days, instead of the 436 days that the trial court awarded. The State confesses error, and we accept the confession. Therefore, we modify the sentences to award defendant a total of 437 days’ credit for time that he spent in custody before sentencing.
In sum, we reduce defendant’s concurrent sentences to five years’ imprisonment for aggravated battery and three years’ imprisonment for criminal trespass to a residence, and we amend the judgment and the mittimus to reflect that defendant is awarded 437 days’ credit for time served before sentencing. In all other respects, we affirm the judgment.
The judgment of the circuit court of Winnebago County is affirmed as modified.
Affirmed as modified.
GILLERAN JOHNSON, J., concurs.