ABC's Wednesday night comedy Happy Endings premiered with a gay marriage law blunder.

The sitcom has been compared to a modern version of NBC's long-running comedy Friends. Modern in the sense that all the friends are not white or straight.

Adam Pally plays Max, the chubby gay guy who's just one of the guys.

While discussing the similarities between Happy Endings and Friends during an interview with E! Online, Pally outed Matthew Perry's Chandler Bing.

“And let's face it, Chandler was gay. Right? Everyone knew Chandler was gay,” Pally, 29, said. “I'll say it: Chandler was gay.”

While the two episodes ABC has aired focus tightly on the romantic relationships of two of the show's straight characters, Max isn't left out completely.

In the pilot, after Dave is left at the alter by his fiancee who runs off with a half naked man on roller blades, Max says: “Even I think roller blades are gay, and I had sex with a man last night.”

Max, however, either is a bit clueless or the writers missed their mark on what he says next.

“Are you really not drinking right now?” Max asks Brad, played by Damon Wayans, Jr. “Cause I would like to think that if this happened at my Massachusetts civil union and you were the best man, you would be slammered.”

Of course, Massachusetts legalized marriage for gay and lesbian couples in 2004.