—Appeal from an order of Supreme Court, Erie County (Glownia, J.), entered March 5, 2001, which, inter alia, denied the motion of defendants Kevin Helmer and Loretta Helmer for summary judgment.
It is hereby ordered that the order so appealed from be and the same hereby is modified on the law by granting the motion of defendants Kevin Helmer and Loretta Helmer and dismissing the amended complaint against them and as modified the order is affirmed without costs.
Memorandum: Plaintiff commenced this action to recover damages for injuries she sustained when she tripped and fell over a raised section of sidewalk in front of property owned by defendants Kevin Helmer and Loretta Helmer. Supreme Court properly granted the cross motion of defendant City of Buffalo (City) for summary judgment dismissing the amended complaint against it. The City established that written notice of the alleged dangerous condition of the sidewalk had not been “actually given to the city clerk” (Charter of City of Buffalo § 21-2). Such notice is a condition precedent to an action against the City for injuries resulting from the dangerous condition of a City sidewalk, and the fact that the City had actual notice of the defect is not a substitute for compliance with the Charter provision (see Lalley v Adam, Meldrum & Anderson Co., 186 AD2d 1083, 1084; Deans v City of Buffalo, 181 AD2d 1015).
The court erred, however, in denying the motion of the Helmers for summary judgment dismissing the amended complaint against them. As a general rule, “liability for injuries sustained as a result of negligent maintenance of or the existence of dangerous and defective conditions to public sidewalks is placed on the municipality and not the abutting landowner” (Hausser v Giunta, 88 NY2d 449, 452-453). The Helmers established that no exception to that general rule applies, i.e., the sidewalk was not constructed in a special manner for their benefit; they did not cause the defective condition; and no City ordinance imposes liability upon them for injuries resulting *897from their failure to maintain or repair the sidewalk (see id. at 453).
Contrary to plaintiffs contention, we conclude that section 413-50 (A) of the Code of City of Buffalo (Code) does not impose liability upon the Helmers for plaintiffs injuries. Section 413-50 (A) was amended in 1997 to provide that the owner or occupant of property abutting a public sidewalk “shall be liable for any injury or damage by reason of omission, failure or negligence to make, maintain or repair such sidewalk.” In interpreting the Code, our “primary consideration s* * * is to ‘ascertain and give effect to the intention of the Legislature’ ” (Riley v County of Broome, 95 NY2d 455, 463, quoting McKinney’s Cons Laws of NY, Book 1, Statutes § 92 [a], at 177). To that end, the legislative history “ ‘is not to be ignored, even if words be clear’ (McKinney’s Cons Laws of NY, Book 1, Statutes § 124, at 252)” (id.). The legislative history of the 1997 amendment establishes that the sole impetus for the amendment was to strengthen enforcement of the existing duty imposed upon abutting owners and occupants to remove snow and ice from sidewalks.
Further, the language imposing liability for injuries resulting from failure to discharge that duty should not be removed from its context and viewed in isolation from the remainder of the Code. “It is a well-settled principle of statutory construction that a statute or ordinance must be construed as a whole and that its various sections must be considered together and with reference to each other” (People v Mobil Oil Corp., 48 NY2d 192, 199). Thus, we cannot ignore the fact that the language imposing tort liability upon abutting owners and occupants falls within the Code article and section that address, in substance as well as headings, snow and ice removal (see Code, art VIII [“Snow and Ice. Removal”], § 413-50 [“Duty for removal; penalties for offenses”]). The Code, moreover, contains a provision that addresses sidewalk maintenance generally and imposes upon abutting owners and occupants the duty “to keep the sidewalk * * * in good order and repair” (§ 413-48 [A]; see art VII [“Construction and Maintenance of Sidewalks”], § 413-48 [“Maintenance of sidewalks; penalties for offense”]), but does not impose tort liability upon abutting owners and occupants for failure to discharge that duty. Finally, we attach no significance to the failure of the City, during the course of this litigation, to take a position with respect to the interpretation of section 413-50 (A). More significant, in our view, is the fact that the Commissioner of the City’s Department of Public Works acknowledged prior to plaintiffs accident that it was *898the City’s obligation to repair the Helmers’ sidewalk at the City’s sole expense (see § 413-44 [E]).
We therefore modify the order by granting the motion of the Helmers and dismissing the amended complaint against them.
All concur, except Lawton, J., who dissents in part and votes to affirm in the following memorandum.