Mass of a weakly measured photon