2,699. The Testimony of Invalid Witnesses
Hilchos Shevuos 10:1
If one or both witnesses were invalid, a relative or disqualified as a witness even under rabbinic law, or if one of them was the king, who is not permitted to testify, or if the testimony of the witnesses was hearsay – in all of these cases, even if both witnesses denied having information and took an oath to that effect, they’re not liable for an oath of testimony. This is because, had they testified, their testimony wouldn’t have been sufficient to make the defendant pay.
Hilchos Shevuos 10:2
Let’s say that the plaintiff imposed an oath on the witnesses that they testify that person X promised to give him 200 zuz but has not done so; the witnesses deny having information with an oath. In such a case, they’re not liable for an oath of testimony because even if they testified about this, the defendant wouldn’t have to pay for making such a statement. The same is true in all comparable cases.