There was another shock death on Wednesday’s “Modern Family”.

Phil (played by Ty Burrell) could be seen asking his dad Frank (Fred Willard) about a recent incident at the grocery store, with him worrying he had dementia.

As Frank insists he was just wandering around, Phil then asks whether he’d ever thought about having another child to take over the family business.

Frank shared, “The answer is no, Phil, never. Because, well, you did take over the family business, didn’t you? Keeping life light, making it fun for everybody.”

Phil replied, “I learned from the best.”

Despite Frank not having dementia, he did die off-screen, with viewers being left in tears.

Phil says of his dad, “When I was growing up, he was the cool dad.

“He was hip. He knew all the dances from ‘Grease’ [and] he knew all the expressions—BFF: best friends forever, TMI: too much Information, BJ: blue jeans… We didn’t do much that day, but it might have been one of the best days I’ve ever had with my dad. I just didn’t know it would be the last.”

The episode then cuts to Phil as he eulogized Frank at a small gathering. See more from the emotional scene in the clip above.

As ET reports, Sarah Hyland —  who plays Frank’s granddaughter, Haley Dunphy, offered her candid reaction to watching the episode, via Instagram Story.

“So I don’t read scripts of the episodes of Modern Family that I’m not in, so I just found out that my grandpa’s dead along with all of you,” she told fans. “I still feel special.”

Fans immediately pointed out that she had just dropped a huge spoiler, and she returned to Instagram Story to apologize.

“Oh yeah, I guess I should have put a spoiler alert for Grandpa Frank dying, but I was just caught off-guard,” she said. “As his granddaughter, you’d think I’d be invited to the funeral.”

In a subsequent interview with Entertainment Weekly, “Modern Family” co-creator Christopher Lloyd explains that the decision to kill off the character was actually a way to shed more light on Phil.

“It was a tough decision because you don’t ever want to let go of a character that you love,” admitted Lloyd. “And I’ve always loved that character. However, we are in the final season, we’re looking to find more meaningful topics to deal with. And even more important than that, it gave us a chance to really take a look at how Phil came to be Phil.”

He continued: “Phil has, in many ways, been really dead-centre of the heart of the show. But he’s a little bit of this man-child. It was a chance to lend some dimension to that. That isn’t just Phil being goofy, that’s actually a choice. He learned this from his dad, that somebody can be the one who keeps life light, and that’s important not just in a family but maybe in a community… it was a bittersweet way of seeing where he learned that and that it’s sort of an ethic on his part and not just a goofy characteristic.”

This is the final season of the beloved show. The series finale is set to air April 8.

Tune in to “Modern Family” airing Thursdays at 9 p.m. ET/PT on Global.

Click to View Gallery
This Week On TV: Jan. 13-19