Fiqh-us-Sunnah Volume 003, Zakaat and Fasting, Fiqh 3.139A.

Section : Fasting, ejaculation of sperm.

Ejaculation voids the fast even if it was just due to kissing, hugging, or masturbation, and the day must be made up. If the ejaculation was due to looking at or thinking about something, then it is like having a wet dream during the day and it, therefore, does not void the fast nor is there any requirement on the person. Similarly, ejaculation of seminal fluid does not harm the fast in any way.