Blame commissioner David Stern for part of this public-relations disaster.

Two NBA sources told The Post that Knicks owner James Dolan actually did speak with David Stern to give him a heads-up on the Isiah Thomas hire before Friday’s announcement. The conflict-of-interest issue slipped by both men.

Thomas also checked with the NCAA about having both roles of college coach and NBA consultant and got the OK. Since Stern did not object, his hometown Knicks received five days of damaging publicity.