The plane we were to take off on landed in Philadelphia at 12:35am this morning. When we boarded the plane, a leak was discovered in one of the bathrooms. Clearly the bathrooms were not inspected when the plane arrived in PHL after midnight. Everyone was deplaned and put on another plane. We were given incorrect time frames and wound up taking off over 2 1/2 hours late. This all could have been avoided had they inspect the bathrooms at midnight.