
61 Ill. App.3d 209 (1978)
377 N.E.2d 1174
JAMES W. JOHNSTON et al., Plaintiffs-Appellants,
v.
THE CITY OF BLOOMINGTON et al., Defendants-Appellees.
No. 14700.
Illinois Appellate Court  Fourth District.
Opinion filed June 9, 1978.
Rehearing denied July 31, 1978.
George L. Chesley, of Bloomington (DePew, Grimes & Chesley, of counsel), for appellants.
Charles C. Compton, of Bane, Allison & Saint, P.C., and H. Paxton Bowers, both of Bloomington, for appellees.
Reversed and remanded.
Mr. JUSTICE TRAPP delivered the opinion of the court:
This case comes on appeal from a trial court order dismissing plaintiffs' complaint. We reverse and remand.
*210 The complaint, filed on February 19, 1976, contains three counts. Upon motion in her behalf Kymberly Mason was dismissed as party-plaintiff. Count I is an individual action by James Johnston against the defendants  the City of Bloomington and its treasurer, Paul W. Krueger. It alleges that on February 27, 1973, Johnston paid $17 for a violation of chapter 32, section 27, of the Bloomington Municipal Code. (The trial court and the parties refer to this section as the city's speeding ordinance.) On January 6, 1976, in City of Bloomington v. Guess, section 27 of the Municipal Code was declared unconstitutional by the circuit court of McLean County. We are not aware of why the ordinance was declared unconstitutional, but it does not matter in this appeal. The city did not appeal that judgment and the time for appeal has passed. Johnston prayed for the return of his $17 plus costs.
Count II is a class action against the same defendants by James Johnston as representative of a class described as those persons who, between January 1, 1961, and October 16, 1975, paid a fine for violating section 27 of the Bloomington Municipal Code. The count makes further allegations for a class action and requests that all convictions against persons prosecuted under section 27 be vacated and their fines returned. Count III is an individual action by William Fike, and he makes the same allegations as in Count I.
Initially, we point out that a city's enforcement of an ordinance, as in the instant case, is quasicriminal in nature, e.g., City of Carbondale v. Irving (1977), 45 Ill. App.3d 699, 360 N.E.2d 118. Therefore, plaintiffs are attacking something less than criminal convictions.
When a case comes on appeal from a trial court order dismissing a complaint, all the facts alleged in the complaint are taken as true, albeit, legal conclusions are not admitted. (E.g., Acorn Auto Driving School, Inc. v. Board of Education (1963), 27 Ill.2d 93, 187 N.E.2d 722.) Therefore, for purposes of appeal, we assume as true that plaintiffs paid fines under a city ordinance that was later declared as unconstitutional.
The trial court, in a written opinion, entered judgments for the defendants and dismissed the complaint. The court's opinion emphasized that he was neither addressing the question of the constitutionality of the ordinance, nor whether the class action could be maintained. The trial court considered the issue to be whether this cause of action could be maintained long after the appeal period had expired. The opinion relies principally on two cases  People v. Warr (1973), 54 Ill.2d 487, 298 N.E.2d 164, and Berg v. City of Chicago (1968), 97 Ill. App.2d 410, 240 N.E.2d 344.
In Warr, defendants did not directly appeal their convictions, but made unsuccessful collateral attacks on their misdemeanor convictions. The Illinois Supreme Court noted that there are three ways to collaterally *211 attack criminal convictions: (1) habeas corpus; (2) post-conviction hearings; and (3) a section 72 petition. For various reasons, these remedies were not available to the Warr defendants. Therefore, the supreme court promulgated a rule that a defendant, convicted of misdemeanor, who asserts that there was a substantial denial of his constitutional rights, may institute a proceeding under the Post-Conviction Hearing Act within four months of a conviction if he pleaded guilty, and within six months if he had a trial. (Accord, People v. Davis (1973), 54 Ill.2d 494, 298 N.E.2d 161.) Previously, post-conviction proceedings were available only to those persons convicted of felonies.
In the instant case, the trial judge felt that Warr precluded plaintiffs' class action because no member of the class appealed the judgment on the ordinance violation within the time set for appeal, and the attack now made was beyond the four and six months' deadline as set by the supreme court in Warr. Plaintiffs assert that Warr has no applicability to the present case. We agree.
 1 The court in Warr was concerned with the constitutional deficiencies in the procedure resulting in criminal convictions. The present case does not involve a "conviction" or post-conviction proceedings, nor is it an attempt to collaterally attack judgments based on constitutional error. The City's prosecution of its ordinance was not a criminal prosecution under section 1-2-1.1 of the Illinois Municipal Code (Ill. Rev. Stat. 1975, ch. 24, par. 1-2-1.1), but was an action for debt. City of Danville v. Hartshorn (1973), 53 Ill.2d 399, 292 N.E.2d 382.
A statute that is declared unconstitutional is void, ab initio. Such a law confers no rights, imposes no duty, and affords no protection. (Board of Highway Commissioners v. City of Bloomington (1911), 253 Ill. 164, 97 N.E. 280; Grasso v. Kucharski (1968), 93 Ill. App.2d 233, 236 N.E.2d 262.) One court explained this principle as follows:
"Holding that a law is unconstitutional is quite different from holding that a defendant has not received constitutional treatment under a law. * * * But, if the law is unconstitutional, there is no law and there can be no question about proper procedures for protecting his rights under the law because in theory his rights have never been threatened or affected, and he should be placed in the position he occupied before he was arrested." (People v. Weintraub (1974), 20 Ill. App.3d 1090, 1093, 313 N.E.2d 606, 608, aff'd sub nom.; People v. Meyerowitz (1975), 61 Ill.2d 200, 335 N.E.2d 1.)
The supreme court has said:
"A void judgment can be impeached at any time in any proceeding whenever a right is asserted by reason of that judgment, and it is immaterial, in a consideration of the validity of *212 the judgment, whether or not the time for review by appeal has expired." (Reynolds v. Burns (1960), 20 Ill.2d 179, 192, 170 N.E.2d 122, 129.)
Plaintiffs are correct that Warr does not apply to the present case since they are basing their complaint on a void ordinance as opposed to a denial of a constitutional right under a valid ordinance.
The trial court's opinion also relies heavily upon Berg v. City of Chicago. In Berg, plaintiffs brought a class action for declaratory judgment, alleging certain traffic ordinances of the city were void. The relief requested was the return of fines and vacation of the judgments against those members of the class. After the court held that certain representatives of the plaintiff did not have standing to bring the declaratory suits, the court examined the question of whether anyone could recover the fines. The court held that the fines were paid under a mistake of law; therefore, they were not recoverable because they were voluntarily made. The Berg analysis is highly questionable in the light of People v. Meyerowitz.
Our supreme court in People v. McCabe (1971), 49 Ill.2d 338, 275 N.E.2d 407, declared that a defendant convicted of the illegal sale of marijuana under section 38 of the 1969 Uniform Narcotic Drug Act (Ill. Rev. Stat. 1969, ch. 38, par. 22-40) was denied the equal protection of the law under the United States and Illinois constitutions. In Meyerowitz, the court gave the McCabe case retroactive application so that all persons convicted under the constitutional act were entitled to have their convictions expunged and a refund of their fines and costs without interest. (Accord, McCabe v. Burgess (1978), 57 Ill. App.3d 450, 373 N.E.2d 327.) Under Meyerowitz, the plaintiffs in the present case have stated a proper cause of action.
Nevertheless, the trial judge in the present case found Berg to mean that money paid, without any compulsion, is not recoverable, even if the money is paid under an unconstitutional statute. This principle is also discussed in Yates v. Royal Insurance Co. (1902), 200 Ill. 202, 65 N.E. 726; Holder v. City of Galena (1885), 19 Ill. App. 409. Both Yates and Holder rely on the proposition that ignorance of the law is no excuse; therefore, if one pays a fine under an unconstitutional statute, the payment is conclusively presumed to be voluntary because everyone must know the law. The fallacy with this reason, of course, is that not everyone "knows" the intricacies of the law. It was this background that led the Berg court to conclude that voluntary payments are not recoverable.
The Berg proposition on voluntarism is unwarranted. It is highly fictitious to say that one charged with violating a speeding ordinance should later be precluded from recovering fine money paid under the *213 void ordinance simply because he voluntarily paid it. The reasoning merely assumes the conclusion. It has never been explained why money taken under a "mistake of law" should be kept by a governmental entity that wrongly demanded it. Equitable considerations require restitution of money illegally obtained. See Board of Highway Commissioners; Ross v. City of Geneva (1978), 71 Ill.2d 27, 373 N.E.2d 1342.
If an accused contests his traffic ticket and is later found guilty at trial, it is ludicrous to say that the payment of the fine was voluntarily made. Supreme Court Rule 529 provides a schedule for the payment of fines by pleading guilty. This schedule makes it easier for the courts and those who violate traffic regulations to pay fines to avoid the nuisance of a trial in which the person contesting the ticket would likely lose because the charge is one of absolute liability. Ill. Rev. Stat. 1977, ch. 95 1/2, par. 11-202; ch. 38, par. 4-9; but see People v. Hutchison (1977), 46 Ill. App.3d 725, 361 N.E.2d 328.
Undoubtedly, numerous persons chose to pay a fine rather than relinquish their privilege to drive if they did not appear at trial. (Ill. Rev. Stat. 1977, ch. 95 1/2, par. 6-306; Supreme Court Rule 556.) It may be contempt to refuse to pay a fine and the Bloomington city ordinance provided imprisonment for the refusal to pay a fine. Such alternatives cannot reasonably be characterized as voluntary any more so than in Meyerowitz where the defendants paid their fines as a condition of probation. See also Ross v. City of Geneva.
To follow the city's arguments that the fines should remain untouched would be equivalent to declaring that an ordinance, which has been declared unconstitutional, was at one time constitutional. However, unconstitutional statutes are void and of no effect. (Meyerowitz.) Moreover, money is not the only matter involved here. If the judgments are vacated, suspended licenses may be returned and insurance rates may be lowered.
There was some discussion that the trial court was not bound by a different trial judge's prior decision that the ordinance was unconstitutional. The trial court's opinion in the present case did not address the constitutionality of the ordinance. However, upon remand, plaintiffs may ask the trial court to declare the ordinance unconstitutional as alternatively prayed in its motion, or they may attempt to use the prior judgment of unconstitutionality as collateral estoppel against the city. (See generally 50 C.J.S. Judgments §§ 634, 712 (1947).) Subsequent to the filing of plaintiffs' complaint, the legislature has passed, and the Governor has signed, a new law setting forth the requirements for a class action. (Ill. Rev. Stat. 1977, ch. 110, par. 57.2 et seq.) The law became effective on October 1, 1977, and applies to cases on appeal. (Steinberg v. Chicago *214 Medical School (1977), 69 Ill.2d 320, 371 N.E.2d 634.) The plaintiffs' complaint meets the requirements set forth in the statute. McCabe v. Burgess (1978), 57 Ill. App.3d 450, 373 N.E.2d 327.
 2 We realize, as the trial court did, that the effect of our opinion may be burdensome to the City of Bloomington, but that does not bear upon the issue of whether plaintiffs had stated a cause of action and we hold that they have.
Reversed and remanded with directions.
REARDON, P.J., and CRAVEN, J., concur.
