into two categories:
The first concerns a right of Allah, Exalted is He.
The second concerns a right belonging to another person.
A right of Allah, Mighty and Majestic is He, falls into two categories: cases involving no continuing unlawful state, and cases involving a continuing unlawful state.
As for the former—such as unlawful sexual intercourse, drinking wine, and similar acts—a witness incurs no blame by not disclosing his testimony, since this conceals the offender’s wrongdoing. The basis for this is the statement of the Messenger of Allah ﷺ to Hazzāl:
“Hazzāl, why did you not conceal him with your cloak?”
Even if the ruler learns of it, Ibn al-Qāsim said in al-Majmūʿa: “They should withhold their testimony from him and not testify concerning it, except to impeach the offender’s credibility if he testifies against someone.”
As for cases involving a continuing unlawful state—such as those concerning manumission, divorce, charitable endowments, mosques, bridges, and the like—the witness must disclose his testimony, while another person takes up the matter. If he does not disclose his testimony, it becomes inadmissible, because his silence constitutes an impairment of his probity. If he himself takes up the case on the strength of his testimony, however, there is disagreement over whether his testimony is admissible. Ibn al-Qāsim held that it is inadmissible when he himself pursues the case.
Mutarrif, Ibn al-Mājishūn, and Asbagh held that their testimony is admissible even when they themselves pursue the case. If someone else comes forward to testify, the obligation is lifted from him, and his doing so is recommended, since it helps uphold what is right. If no one else comes forward to testify, doing so becomes his individual obligation.
As for the other category—a right belonging to another person—he must inform the right-holder of his testimony. If he fails to do so, ʿĪsā narrated from Ibn al-Qāsim that his testimony becomes invalid.
Sahnūn held that it does not become invalid. A passage attributed to Ashhab in al-Mabsūta apparently indicates that testimony is not invalidated by silence and failure to disclose it, whether it concerns people’s rights or a right of Allah, Exalted is He. This, however, is an unlikely position. Some scholars hold that anyone called upon to be a witness is obliged to respond