ذِكْرُ الزَّجْرِ عَنْ أَنْ يَحْلِفَ الْمَرْءُ بِأَبِيهِ، أَوْ بِشَيْءٍ غَيْرِ اللَّهِ جَلَّ وَعَلَا
The Messenger of Allah ﷺ found 'Umar al-Khattab in a caravan while he was swearing by his father. So he said: Allah forbids you to swear by forefathers. If anyone swears, he must swear by Allah or keep silence. (Using translation from Abū Dāʾūd 3249)
أَدْرَكَ رَسُولُ اللَّهِ ﷺ عُمَرَ بْنَ الْخَطَّابِ وَهُوَ يَحْلِفُ بِأَبِيهِ فَقَالَ النَّبِيُّ ﷺ «إِنَّ اللَّهَ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ فَلْيَحْلِفْ حَالَفٌ بِاللَّهِ أَوْ لِيَسْكُتْ»