All marriages contracted while either of the parties has a former wife or husband living shall be void. But this section shall not extend to a person whose husband or wife shall be absent for the space of five years, the one not knowing the other to be living during that time, not to any person who shall be divorced or whose first marriage shall be declared void by the sentence of a competent court.