عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ مَنْ حَلَفَ عَلَى يَمِينٍ فَرَأَى خَيْرًا فَلْيُكَفِّرْ عَنْ يَمِينِهِ وَلْيَفْعَلِ الَّذِي هُوَ خَيْرٌ
Narrated by Sayyiduna Abu Huraira (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: Whoever swears an oath about something, but later sees something else better, he should offer expiation for his oath and do what is better.