وَأَخْبَرَنَا أَبُو الْحَسَنِ عَلِيُّ بْنُ أَحْمَدَ بْنِ عَبْدَانَ أنا أَحْمَدُ بْنُ عُبَيْدٍ، نا بِشْرُ بْنُ مُوسَى، نا أَبُو زَكَرِيَّا، نا حَمَّادُ بْنُ سَلَمَةَ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ رَضِيَ اللهُ عَنْهُمَا عَنِ النَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: " مَنْ حَلَفَ عَلَى يَمِينٍ فَقَالَ إِنْ شَاءَ اللهُ فَهُوَ بِالْخِيَارِ، إِنْ شَاءَ فَعَلَ وَإِنْ شَاءَ لَمْ يَفْعَلْ " وَرُوِيَ فِيهِ حَدِيثٌ ضَعِيفٌ عَنْ مُعَاذِ بْنِ جَبَلٍ رَضِيَ اللهُ عَنْهُ مَرْفُوعًا.
Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says that the Prophet (peace and blessings be upon him) said: "Whoever swears an oath and says 'In sha' Allah', he has the choice: if he wishes he may do it, or not do it."
A weak hadith has been narrated on this from Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) as marfu' (attributed to the Prophet).