The eminent Muslim scholar and renowned Da`iyah, Sheikh `Abdel Khaliq Hasan Ash-Shareef, states: “There is no effect for that on the nikah (marriage contract). But this act corrupts one’s morals and thus its effect appears in this area. The person doing that is psychologically ill and perverted in morals. If he started to imagine doing that today, then what prevents him from doing that in reality later. Indeed, such perverted matters start as an idea or imagination then it ends up in doing it in reality.
Therefore, such a person has to come to senses and to treat himself from this malignant disease. He should fear Allah and try to fulfill his desire in the halal marriage.