Yes, there is a law, Proposition 22, that makes the homosexual marriages illegal, but the state constitution contains an equal protection clause that may have made Proposition 22 illegal in the first place, which is why San Francisco has sued the state. So it depends on what trumps what, in legal terms.