In an election, the 2nd placer has no right to take the contested public office if the winner is disqualified AFTER the election. But if the decision of disqualification is made BEFORE the election yet the people still voted for the disqualified candidate then the 2nd highest vote getter may be proclaimed as the winner. The votes casted in favor of the highest vote getter, in this case, will be considered as stray votes.
From Labo Jr. vs COMELEC