Article 245. Abuses Against Chastity — Penalties. — The penalties of prisión correccional in its medium and maximum periods and temporary special disqualification shall be imposed:

  1. Upon any public officer who shall solicit or make immoral or indecent advances to a woman interested in matters pending before such officer for decision, or with respect to which he is required to submit a report to or consult with a superior officer;

  2. Any warden or other public officer directly charged with the care and custody of prisoners or persons under arrest who shall solicit or make immoral or indecent advances to a woman under his custody.

If the person solicited be the wife, daughter, sister or relative within the same degree by affinity of any person in the custody of such warden or officer, the penalties shall be prisión correccional in its minimum and medium periods and temporary special disqualification.