Compiled by Imam Yahya ibn Sharaf al-Nawawi
وعن أبي هريرة رضي الله عنه أن رسول الله صلى الله عليه وسلم قال: "من حلف على يمين، فرأى غيرها خيرًا منها، فليكفر عن يمينه، وليفعل الذي هو خير" ((رواه مسلم)).
The Messenger of Allah (ﷺ) said, "When you swear an oath and consider something else to be better than it, make expiation for your oath and do the thing that is better."[Muslim].