The later Sheikh Ibn `Uthaimeen (may Allah have mercy upon him) was asked about a person who made a pledge with Allah that if Allah helped him accomplish something, he will not do so and so again. After that, his matters were fulfilled but he could not cope with his pledge, what should he do?
The Sheikh answered, “We are in need to know that which he made a pledge with Allah to avoid. If it is an allowable matter, for example a kind of food or whatever alike, then we say to him you may eat it if you desire and make expiation from your pledge.
If it is not allowed, such as backbiting, such act becomes prohibited for that person from two points. The first is that it is basically forbidden and the second is that he took a pledge with Allah to abstain from it if his wish is fulfilled and it was so.”
In light of this we know that when taking pledge with Allah to avoid something that is basically haram, the responsibility is doubled and a person must be careful with this.
We know well that logging in and browsing pornographic sites and watching pornographic movies are forbidden because a Muslim is always commanded to lower his/her gaze, let alone give a loose rein to his/her hungry eye to look at the private parts of others. More importantly, such acts cause psychological and social injury.
So, our advice to such a Muslim is to keep his pledge with Allah and never go back to such act again.
As regards the expiation, scholars stated that making pledge with Allah is regarded as a vow as stated sheikh Al-Islam Ibn Taymiyyah who said, “If a person said, ‘I make pledge with Allah to perform Hajj this year.”, it is regard as a vow, commitment and pledge.”
Thereupon, the brother who vows must offer expiation (kafarah) for breaking his vow, which is the same as kafarat yameen (expiation for breaking an oath). Ibn ‘Abbaas (may Allaah be pleased with them both) said, “Whoever makes a vow and is then unable to fulfill it, his expiation is kafarat yameen.” (Reported by Abu Dawud. Al-Haafiz Ibn Hajar said in Bulugh al-Maram, Its chain of narration is sound, and some scholars of Hadith thought it was mawquf.).
The expiation for breaking an oath is to set free a slave, or to feed or clothe ten poor persons. Whoever cannot do any of those things should fast for three days. Almighty Allah says:
“Allah will not take you to task for that which is unintentional in your oaths, but He will take you to task for the oaths which ye swear in earnest. The expiation thereof is the feeding of ten of the needy with the average of that wherewith ye feed your own folk, or the clothing of them, or the liberation of a slave, and for him who findeth not (the wherewithal to do so) then a three days’ fast. This is the expiation of your oaths when ye have sworn; and keep your oaths. Thus Allah expoundeth unto you His revelations in order that ye may give thanks.” (Al-Ma’idah, 5:89)
May Allah guide all to what pleases Him!