It is narrated from Ibn Jurayj (may Allah have mercy on him): Ibn Abi Mulaykah (may Allah have mercy on him) informed me that Uqbah bin al-Harith (may Allah be pleased with him) informed him that he married Umm Yahya bint Abi Ihab. A black slave woman came and said: I have nursed both of you. He said: I came to the Prophet (peace and blessings be upon him) and mentioned it to him (peace and blessings be upon him). He (peace and blessings be upon him) turned away. I came from the other side and mentioned it to him (peace and blessings be upon him). He (peace and blessings be upon him) said to him: "How is that possible, when she claims that she has nursed both of you?"
Imam al-Shafi'i (may Allah have mercy on him) said: His (peace and blessings be upon him) turning away suggests that he (peace and blessings be upon him) did not regard her testimony as something that would make (the annulment of the marriage) binding; and his saying, "How, when she claims that she has nursed both of you?" suggests that he (peace and blessings be upon him) disliked him remaining with her after it had been said to him that she was his foster sister. This is the meaning of what we said: that he should leave her out of scrupulousness (wara'), not as a binding ruling.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الرضاع / 15674