If any person corruptly give, offer or promise to any executive, legislative or judicial officer, sheriff or police officer, or to any candidate for such office, either before or after he shall have taken his seat, any gift or gratuity, with intent to influence his act, vote, opinion, decision or judgment on any matter, question, cause or proceeding, which is or may be then pending, or may by law come or be brought before him in his official capacity, he shall be guilty of a Class 4 felony and shall forfeit to the Commonwealth any such gift or gratuity given. This section shall also apply to a resident of this Commonwealth who, while temporarily absent therefrom for that purpose, shall make such gift, offer or promise.
Code 1950, § 18.1-278; 1960, c. 358; 1975, cc. 14, 15; 1978, c. 123.