The following sentence has been split into four segments. Identify the segment that contains a grammatical error.
She was thinking / of marrying Sanjay / when she discovered / he has already married.
1
of marrying Sanjay
2
She was thinking
3
when she discovered
4
he has already married