In the books, Ezra gets arrested after A sends a text to Sean, Aria's boyfriend. In the show, Noel, Aria's then-boyfriend, found out about Ezra and was about to out him but A got to him first.