Zuhri reported,

Salim bin Abdullah reported that his father said, "I heard Umar bin Khattab say that the Messenger of Allah ﷺ said, 'Allah عز وجل forbids you to swear by your fathers.'"Umar said, "By Allah, I have never sworn by them since I heard the Messenger of Allah ﷺ forbid it, neither speaking on my own nor quoting anyone else."In Aqeel's version, however, the wording is, "I have never sworn by them since I heard the Messenger of Allah ﷺ forbidding it, nor have I uttered such an oath," and he did not say, "neither speaking on my own nor quoting anyone else."

Muslim 4255

Sahih

و حدثني عبد الملك بن شعيب بن الليث حدثني أبي عن جدي حدثني عقيل بن خالد ح و حدثنا إسحق بن إبراهيم وعبد بن حميد قالا حدثنا عبد الرزاق أخبرنا معمر كلاهما عن الزهري بهذا الإسناد مثله غير أن في حديث عقيل ما حلفت بها منذ سمعت رسول الله ﷺ ينهى عنها ولا تكلمت بها ولم يقل ذاكرا ولا آثرا

مسلم 4255صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Oaths
Chapter
Prohibition of swearing by other than Allah
Numbering
Darussalam 4255
Muslim 4255