Any police officer or fireman who shall violate any of the provisions of section twenty-three of this article shall also be guilty of a misdemeanor, and, upon conviction thereof, shall be punished by a fine of not less than fifty dollars and not more than three thousand dollars, or by imprisonment for a term not exceeding two years, or by both such fine and imprisonment, in the discretion of the court.
53 P.S. § 12645