
955 N.E.2d 664 (2011)
353 Ill. Dec. 197
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Vladislav VINOKUR, Defendant-Appellant.
No. 1-09-0798.
Appellate Court of Illinois, First District, Third Division.
August 24, 2011.
*665 Anita M. Alvarez, State's Attorney (Allan J. Spellberg, Matthew Connors, Anthony M. O'Brien, Assistant State's Attorneys, of counsel), Chicago, IL, for Plaintiff-Appellee.
Michael J. Pelletier, State Appellate Defender, Alan D. Goldberg, Deputy Defender, Rachel M. Kindstrand, Asst. Appellate Defender, Office of the State Appellate Defender, Chicago, IL, for Defendant-Appellant.

OPINION
Presiding Justice QUINN delivered the judgment of the court, with opinion.
¶ 1 Defendant Vladislav Vinokur appeals from the summary dismissal of his petition for relief under the Post-Conviction Hearing Act (Act) (725 ILCS 5/122-1 et seq. (West 2008)). On appeal, defendant contends that: (1) the trial court erred in dismissing his petition on the basis that he lacked standing; (2) it was improper for the trial court to consider whether he had standing at the first stage of postconviction proceedings; and (3) his sentence was void and must be vacated. We find that defendant did not have standing to file his petition and therefore affirm the judgment of the trial court.
¶ 2 Defendant was born in Russia and became a permanent resident alien of the United States on December 18, 1989. On January 5, 2003, the police pulled defendant over, observed marijuana in the car, and arrested him.
¶ 3 On April 28, 2003, defendant pled guilty to one count of possession of cannabis with the intent to deliver in an amount between 30 and 500 grams. 720 ILCS 550/5(d) (West 2002). Defendant was sentenced to first-time offender probation and received 24 months of probation, 30 hours of community service, and 3 periodic drug tests, and he was ordered to pay $1,500 in probation fees under section 10 of the Cannabis Control Act (720 ILCS 550/10 (West 2002)). On April 15, 2005, the trial court terminated defendant's probation as having been successfully completed.
¶ 4 Subsequently, defendant learned that his guilty plea and sentence subjected him to deportation. On December 1, 2008, defendant filed a postconviction petition alleging that his guilty plea was not knowing or voluntary because the trial court affirmatively misstated the immigration consequences of his plea. The trial court summarily dismissed defendant's petition on February 20, 2009, based on defendant's lack of standing. Defendant filed a timely notice of appeal on March 17, 2009.
¶ 5 On appeal, defendant first contends that he had standing to bring his claim under the Act. The State asserts that defendant had no standing to file a postconviction petition because at the time he filed it, he was no longer "`imprisoned in the penitentiary'" as required by the Act, relying on People v. Carrera, 239 Ill.2d 241, *666 257, 346 Ill.Dec. 507, 940 N.E.2d 1111 (2010). In response, defendant contends that Carrera does not apply because he is asserting a void sentence issue, which can be raised at any time. We agree with the State and for the following reasons find that defendant had no standing to file a postconviction petition, that his petition was properly dismissed at the first stage of proceedings, and that we are therefore unable to reach the merits of his void sentence claim.
¶ 6 The Act states "[a]ny person imprisoned in the penitentiary may institute a proceeding under this Article." 725 ILCS 5/122-1(a) (West 2008). A defendant is "imprisoned in the penitentiary" for the purposes of the Act when his liberty is actually constrained by the State. People v. Rajagopal, 381 Ill.App.3d 326, 329-30, 319 Ill.Dec. 472, 885 N.E.2d 1152 (2008). Therefore, when a defendant is no longer constrained by the State, he has no standing to file a petition for relief under the Act. Rajagopal, 381 Ill.App.3d at 332, 319 Ill.Dec. 472, 885 N.E.2d 1152. Generally, when a defendant has fully served his underlying sentence before filing a postconviction petition, he no longer has standing to file a petition. Carrera, 239 Ill.2d at 253, 346 Ill.Dec. 507, 940 N.E.2d 1111. However, the definition of "imprisoned in the penitentiary" has been held to include the direct consequences of a guilty plea because they relate to the sentence imposed on the basis of the plea, while "collateral consequences are not related to the length or nature of the sentence." (Internal quotation marks omitted.) Rajagopal, 381 Ill.App.3d at 331, 319 Ill.Dec. 472, 885 N.E.2d 1152 (quoting People v. Williams, 188 Ill.2d 365, 372, 242 Ill.Dec. 260, 721 N.E.2d 539 (1999)). The first stage dismissal of a postconviction petition is reviewed de novo. People v. Brown, 236 Ill.2d 175, 184, 337 Ill.Dec. 897, 923 N.E.2d 748 (2010).
¶ 7 In Carrera, the Illinois Supreme Court addressed the question of whether a defendant who faces deportation as a result of his guilty plea has standing to challenge his plea under the Act. Carrera, 239 Ill.2d at 245, 346 Ill.Dec. 507, 940 N.E.2d 1111. There, the defendant pled guilty to unlawful possession of a controlled substance and was sentenced to 24 months of probation. Carrera, 239 Ill.2d at 243, 346 Ill.Dec. 507, 940 N.E.2d 1111. More than a year after the defendant completed his probation, the Immigration and Naturalization Service (INS) took him into custody and instituted deportation proceedings against him. Id. The defendant filed a postconviction petition in which he alleged that his guilty plea was not voluntary because he relied on his counsel's advice that there would be no immigration consequences as a result of his plea. Carrera, 239 Ill.2d at 244, 346 Ill.Dec. 507, 940 N.E.2d 1111. The trial court dismissed the defendant's petition on the State's motion and this court affirmed on appeal. Carrera, 239 Ill.2d at 244-45, 346 Ill.Dec. 507, 940 N.E.2d 1111. The supreme court found that deportation is a collateral consequence of a defendant's guilty plea and the constraint on the defendant's liberty as a result of the plea ended with the completion of his probation. Carrera, 239 Ill.2d at 257, 346 Ill.Dec. 507, 940 N.E.2d 1111. Therefore, the defendant was no longer imprisoned in the penitentiary for the purposes of the Act at the time he filed his petition and did not have standing to file a petition. Carrera, 239 Ill.2d at 253, 346 Ill.Dec. 507, 940 N.E.2d 1111.
¶ 8 Like the defendant in Carrera, here defendant found out he faced deportation after he had completed his probation. Defendant was not "imprisoned in *667 the penitentiary" as required by the Act because he had fully served his underlying sentence prior to filing his petition and, therefore, had no standing to file a petition for postconviction relief.
¶ 9 Defendant argues that his situation is distinguishable from Carrera because it was the trial court, not defense counsel, that misinformed him of the possible immigration consequences. However, the court in Carrera did not limit its holding to situations where a defendant's petition alleges ineffective assistance of counsel. Rather, the court found that the defendant was not "`imprisoned in the penitentiary'" for the purposes of the Act because he "had fully served his sentence in the conviction he now seeks to challenge." Carrera, 239 Ill.2d at 258, 346 Ill.Dec. 507, 940 N.E.2d 1111. We see no reason to depart from this holding simply because defendant seeks to challenge his conviction on a different basis.
¶ 10 Defendant also argues that his case can be distinguished from Carrera because he will be left without a remedy if he cannot file a petition for postconviction relief, relying on People v. Warr, 54 Ill.2d 487, 298 N.E.2d 164 (1973). However, as the Carrera court noted, while the defendants in Warr never had a remedy to challenge their convictions based on a violation of their constitutional rights, defendant here could have filed a postconviction petition while he was serving the sentence imposed on his conviction. Carrera, 239 Ill.2d at 259, 346 Ill.Dec. 507, 940 N.E.2d 1111. We decline to depart from the holding in Carrera, and we find that defendant had no standing to file a petition for relief under the Act.
¶ 11 Defendant next contends that the trial court erred in dismissing his petition for lack of standing at the first stage of postconviction proceedings. Specifically, defendant argues that because standing is an affirmative defense, it must be raised or waived by the State and should not be considered until the second stage of proceedings.
¶ 12 At the first stage of proceedings, a trial court may dismiss a petition if it determines the petition is "frivolous or is patently without merit." 725 ILCS 5/122-2.1(a)(2) (West 2008). If the petition is not dismissed, it moves on to the second stage where the State may respond to defendant's petition or move to dismiss. 725 ILCS 5/122-5 (West 2008).
¶ 13 This district has recently considered the question of whether standing falls under the definition of frivolous or patently without merit. People v. Steward, 406 Ill.App.3d 82, 346 Ill.Dec. 140, 940 N.E.2d 140 (2010). In Steward, the trial court summarily dismissed the defendant's petition for lack of standing because he was no longer imprisoned within the meaning of the Act. Steward, 406 Ill.App.3d at 83-84, 346 Ill.Dec. 140, 940 N.E.2d 140. On appeal, the defendant argued that standing was not an appropriate ground for summary dismissal, relying on People v. Boclair, 202 Ill.2d 89, 273 Ill.Dec. 560, 789 N.E.2d 734 (2002). Steward, 406 Ill. App.3d at 88-89, 346 Ill.Dec. 140, 940 N.E.2d 140. In Boclair, the supreme court defined "merit" as "`legal significance, standing, or importance.'" Boclair, 202 Ill.2d at 101, 273 Ill.Dec. 560, 789 N.E.2d 734 (quoting Webster's Third New International Dictionary 1414 (1986) and citing Black's Law Dictionary 1003 (7th ed.1999)). Using the Boclair definition, the Steward court determined that the legislature intended for the "`frivolous or * * * patently without merit'" standard to encompass the issue of standing. Steward, 406 Ill.App.3d at 90, 346 Ill.Dec. 140, 940 N.E.2d 140 (quoting Boclair, 202 Ill.2d at 101, 273 Ill.Dec. 560, 789 N.E.2d 734). The court concluded that the defendant's *668 petition was properly dismissed at the first stage because a petition "has no merit if filed by an individual who is not imprisoned." Id.
¶ 14 We find no basis to depart from the well-reasoned opinion in Steward. As in Steward, defendant here was no longer imprisoned for the purposes of the Act and had no standing to bring a postconviction petition, and his petition was properly dismissed at the first stage of proceedings.
¶ 15 Defendant contends that, nonetheless, this court may consider whether his sentence was void because a void sentence may be challenged at any time.
¶ 16 It is well established that a void order may be attacked at any time, either directly or collaterally.[1]People v. Brown, 225 Ill.2d 188, 203, 310 Ill.Dec. 561, 866 N.E.2d 1163 (2007); People v. Flowers, 208 Ill.2d 291, 308, 280 Ill.Dec. 653, 802 N.E.2d 1174 (2003). However, the Illinois Supreme Court has held that "[a]lthough a void order may be attacked at any time, the issue of voidness must be raised in the context of a proceeding that is properly pending in the courts." Flowers, 208 Ill.2d at 308, 280 Ill.Dec. 653, 802 N.E.2d 1174.
¶ 17 In Flowers, the defendant pled guilty to seven charges of forgery and received concurrent prison sentences. Flowers, 208 Ill.2d at 295, 280 Ill.Dec. 653, 802 N.E.2d 1174. The trial court also authorized the withholding of 50% of her prison income to pay restitution. Id. The defendant was advised that in order to appeal she was required to first file a written motion to withdraw her plea of guilty and vacate the sentence within 30 days. Id. The defendant filed no postplea motions. Flowers, 208 Ill.2d at 296, 280 Ill.Dec. 653, 802 N.E.2d 1174. Subsequently, she filed a pro se postconviction petition alleging ineffective assistance of counsel. Id. She was assigned an attorney and, more than a year after the defendant was originally sentenced, her counsel filed a motion pursuant to Illinois Supreme Court Rule 604(d) (eff. July 1, 2006) seeking reconsideration of the defendant's sentences. Flowers, 208 Ill.2d at 296, 280 Ill.Dec. 653, 802 N.E.2d 1174. The trial court denied the motion to reconsider and the defendant filed a notice of appeal pro se, at which time her counsel withdrew the postconviction petition. Id. The defendant then filed another notice of appeal, called her "`Motion to ReconsiderPost Conviction Petition.'" Id. Because her postconviction petition had been withdrawn, the appellate court characterized her appeal as from the denial of the motion to reconsider her sentences. Flowers, 208 Ill.2d at 298, 280 Ill.Dec. 653, 802 N.E.2d 1174. The appellate court found that the 50% withholding requirement was void and therefore vacated that portion of the trial court's judgment. Flowers, 208 Ill.2d at 300, 280 Ill.Dec. 653, 802 N.E.2d 1174; see also People ex rel. Illinois Department of Corrections v. Hawkins, ___ Ill.2d. ___, ___, 351 Ill.Dec. 832, 952 N.E.2d 624 (2011). The supreme court found that the trial court lacked subject matter jurisdiction to hear the defendant's motion to reconsider because she failed to file a postplea motion within 30 days of sentencing as required by Rule 604(d). Ill. S.Ct. R. 604(d) (eff. July 1, 2006); Flowers, 208 Ill.2d at 302-04, 280 Ill.Dec. 653, 802 N.E.2d 1174. Therefore, the trial court had no authority to consider her motion on the merits and its ruling was void. Flowers, 208 Ill.2d at 306-07, 280 Ill.Dec. 653, *669 802 N.E.2d 1174. The supreme court explained:
"A void order does not cloak the appellate court with jurisdiction to consider the merits of an appeal. [Citation.] Because the circuit court had no jurisdiction to consider Flowers' Rule 604(d) motion, the appellate court, in turn, had no authority to consider the merits of her appeal from the circuit court's judgment denying her motion." Flowers, 208 Ill.2d at 307, 280 Ill.Dec. 653, 802 N.E.2d 1174.
¶ 18 Similar to the defendant's Rule 604(d) motion in Flowers, here defendant's postconviction petition was not properly before the trial court because he had no standing to file a petition for relief under the Act. Carrera, 239 Ill.2d at 253, 346 Ill.Dec. 507, 940 N.E.2d 1111. Therefore, the trial court properly dismissed defendant's petition at the first stage of proceedings based on lack of standing. See People ex rel. Alvarez v. Skryd, 241 Ill.2d 34, 43, 348 Ill.Dec. 384, 944 N.E.2d 337 (2011) (where the defendant filed an untimely Rule 604(d) motion, the trial court did not have the authority to dismiss the motion on the merits and should have dismissed it for lack of jurisdiction). Though the appeal before us is proper, we only have the authority to determine whether the trial court was correct in dismissing defendant's petition for lack of standing. See Flowers, 208 Ill.2d at 307, 280 Ill.Dec. 653, 802 N.E.2d 1174 (though the trial court lacked jurisdiction to consider motions filed by the defendant after he had taken a direct appeal, the appellate court had the authority to review whether the trial court had jurisdiction (citing People v. Vasquez, 339 Ill.App.3d 546, 553, 274 Ill. Dec. 237, 791 N.E.2d 33 (2003))); Kyles v. Maryville Academy, 359 Ill.App.3d 423, 431-32, 295 Ill.Dec. 860, 834 N.E.2d 441 (2005) (the appellate court was limited to considering the question of the trial court's jurisdiction due to the trial court's lack of jurisdiction to consider the plaintiffs' motion to file an amended complaint); cf. People v. Thompson, 209 Ill.2d 19, 28-29, 282 Ill.Dec. 183, 805 N.E.2d 1200 (2004) (finding that Flowers did not affect the court's decision to consider the merits of the defendant's void sentence claim on appeal from the dismissal of his postconviction petition because his petition and his appeal from its dismissal were both properly before the court). As we have discussed, defendant did not have standing and the trial court properly dismissed defendant's petition.
¶ 19 For the foregoing reasons, we affirm the judgment of the trial court.
¶ 20 Affirmed.
Justices MURPHY and STEELE concurred in the judgment and opinion.
NOTES
[1]  For an interesting analysis of the propriety of this principle, commonly referred to as the "Void Sentence Rule," see Kristopher N. Classen & Honorable Jack O'Malley, Filling the Void: The Case for Repudiating and Replacing Illinois' Void Sentence Rule, 42 Loy. U. Chi. L.J. 427 (2011).
