
89 Ill. App.3d 717 (1980)
412 N.E.2d 4
DOROTHY SHUFELT, Plaintiff-Appellant,
v.
THE CITY OF ROCKFORD et al., Defendants-Appellees.  (THE CITY OF ROCKFORD, Cross-Plaintiff-Appellant,
v.
DAVID L. KLONTZ et al., Cross-Defendants-Appellees.)
Nos. 79-818, 79-819 cons.
Illinois Appellate Court  Second District.
Opinion filed October 6, 1980.
Rehearing denied November 25, 1980.
Edward M. Maher, of Paddock, McGreevy & Johnson, of Rockford, for Dorothy Shufelt.
Dennis L. Leahy, of Rockford, for City of Rockford.
Russell Anderson, of Williams, McCarthy, Kinley, Ruth & Picha, of Rockford, for David L. Klontz et al.
Judgment affirmed.
Mr. JUSTICE LINDBERG delivered the opinion of the court:
Plaintiff, Dorothy Shufelt, filed suit in the Circuit Court of Winnebago County against the city of Rockford and David L. Klontz, John F. Long, and Roger L. Anderson, the individual owners of a funeral home, to recover damages for injuries she sustained in a fall on an allegedly defective public sidewalk. Plaintiff's complaint was in three counts. Count I, *718 directed solely at the city of Rockford, was based on ordinary negligence. This count is not involved in this appeal. Count II, directed solely at the individual defendants, was based upon an alleged violation of section 26-18 of the Rockford Code, which reads as follows:
"Every sidewalk in the City of Rockford, which is so worn or out of repair as to endanger the safety of persons passing over the same, is hereby declared to be a nuisance. No person shall hereafter suffer or permit such nuisance to exist in the front of or adjoining premises owned or occupied by him. Such abutting owner or occupier is liable for injuries sustained by lack of repair."
Count III was based in part upon the Rockford sidewalk ordinance and in part on allegations of ordinary negligence. In particular, paragraph 6 of count III alleged that, on the date of her injury, plaintiff had arrived at the premises of the defendants and parked her vehicle in the parking lot of the funeral establishment, then used the public sidewalk as a means of ingress and egress to the funeral chapel for the purpose of attending funeral services. In paragraph 7(b) and 7(c), plaintiff alleged that the individual defendants were negligent in allowing sections of the sidewalk to separate and to exist at uneven levels, and in failing to warn her of the dangerous condition of the sidewalk.
The city of Rockford thereafter filed a complaint for indemnity against the individual defendants, seeking the recovery of any sums that it would be held liable to pay plaintiff, alleging that the defendants were guilty of active negligence and the city was at most passively negligent. The individual owners of the funeral home moved to dismiss plaintiff's complaint and the city's cross-complaint on a number of theories. In granting defendants' motion to dismiss counts II and III of plaintiff's complaint, the trial court ruled that sections 26-18 and 26-19 of the Rockford ordinances failed to impose a duty upon the adjoining landowner to repair a defective sidewalk, and at most required the landowner to notify the city of the existence of a defective sidewalk. The trial court further ruled that it was unclear as to whether the city intended to impose liability for damages upon the adjoining landowner for failure to repair; but if it did, the statute was unconstitutionally vague and ambiguous in that it imposed liability for failure to repair without clearly imposing a duty to repair. In dismissing the city's cross-complaint for indemnity, the trial court ruled that the city had a duty to maintain and repair sidewalks under State law, and was liable for any injuries resulting from the defective condition of its sidewalks. The trial court ruled that it was unconstitutional for the city to attempt to shift liability for damages to an adjoining landowner.
 1 The primary issue before us on review is whether the trial court erred in dismissing plaintiff's complaint and the city's cross-complaint for *719 indemnity. Since the ruling on the motion to dismiss was based entirely on a question of law, we may sustain the trial court's ruling on any ground justified by the record, even though we may not necessarily agree with the trial court's reasoning. (Scott v. Association for Childbirth at Home (1980), 85 Ill. App.3d 311, 407 N.E.2d 71; Hintz v. Lazarus (1978), 58 Ill. App.3d 64, 373 N.E.2d 1018.) In examining the complaints filed by the parties in the case at bar, we find that each fails to state a cause of action.
Section 26-18 of the Rockford Code declares that a public sidewalk which is out of repair or otherwise defective constitutes a nuisance. It further states that "no person shall hereafter suffer or permit such nuisance to exist in the front of or adjoining premises owned or occupied by him." Generally, the words "suffer or permit" have been construed to require proof of knowledge of the prohibited act or conduct. In Hansmar, Inc. v. Illinois Liquor Control Com. (1979), 78 Ill. App.3d 690, 694, 397 N.E.2d 241, 244, this court interpreted a local ordinance which made it illegal for a liquor licensee to "suffer or permit any minor to be or to remain in" premises holding a liquor license. In considering the question of whether there was sufficient evidence that the tavern owner had violated this ordinance, this court stated:
"The mental state contemplated by the terms `suffer or permit' is in question. We conclude that the use of the quoted words evinces the legislative intent to require proof of either authorization, knowledge, or at least recklessness in failing to know." Hansmar, Inc. v. Illinois Liquor Control Com. (1979), 78 Ill. App.3d 690, 694, 397 N.E.2d 241, 244.
 2 To state a valid cause of action, a complaint must allege such facts as it is necessary for the complainant to prove to entitle him to prevail against the defendant. (Cooper v. Meyer (1977), 50 Ill. App.3d 69, 365 N.E.2d 201.) From our analysis of the authorities, the defendant's knowledge or awareness of the defective condition of the public sidewalk is an essential element necessary to recovery under section 26-18 of the Rockford Code. Thus, plaintiff's complaint must contain an allegation that the individual defendants knew or should have known of the defective condition of the sidewalk. Neither count II nor count III of plaintiff's complaint contains such an allegation. The city's cross-complaint for indemnity suffers from the same infirmity. We thus hold that the trial court acted properly in dismissing the city's cross-complaint and plaintiff's complaint for recovery based upon the Rockford sidewalk ordinance.
 3 We will now examine the remaining allegations of count III of plaintiff's complaint to determine if they state a cause of action based on a theory of common law negligence. In order to hold a defendant liable for negligent maintenance of a sidewalk, the plaintiff must plead and prove that defendant had actual notice of the defective walk or constructive *720 notice of such facts and circumstances as would lead a reasonably prudent person to such knowledge. (Roberts v. City of Sterling (1959), 22 Ill. App.2d 337, 354, 161 N.E.2d 138, 147; see Baker v. City of Granite City (1979), 75 Ill. App.3d 157, 161, 394 N.E.2d 33, 35.) In the instant case, the complaint is fatally deficient in this respect. Since the complaint failed to state a negligence cause of action, the trial court properly granted the motion to dismiss.
For the reasons stated above, we hold that the trial court was correct in dismissing count II of plaintiff's complaint, the city's cross-complaint, and count III of plaintiff's complaint. The trial court's judgment is affirmed. Deciding the case as we do, we need not address any other issues in this case.
Affirmed.
SEIDENFELD, P.J., and UNVERZAGT, J., concur.
