First, let me get a question of wording out of the way, just so my colleagues won't bug me. Whether or not you say photons have mass depends on whether by 'mass' you mean rest mass or mass as in something that has weight etc. Let's take the latter meaning, so we can start with your premise that photons have mass. Another way of saying that is that photons have energy. Energy and mass are the same thing, just measured in different units. That's what the famous equation E=mc^2 says. So now I can get to the answer.
When a photon appears, the mass (energy) it has is lost from something else. For example, an atom may fall to a slightly lower state of energy. The reverse happens when a photon disappears, i.e. is absorbed. Something jumps up to a higher level of mass (energy). So the conservation of energy or mass or whatever you want to call it is obeyed in photon emission and absorption.
Likewise that conservation law, and other conservation laws are obeyed as other particles, typically ones with rest energy like electrons, are created or annihilated. So I guess you could say that all these processes 'debunk the law of conservation of matter'. The only problem is that I'm not sure I've heard of that law. It sounds like some historical idea, maybe from the nineteenth century or earlier.
(published on 10/22/2007)