ticket:5 fixed exception when no photo uploaded.