When I was googling "My Three Sons" just now, I noticed that there seems to be some confusion about the origins of Ernie on the show with regards to the departure of Mike from the show; confusion that could only come about by people who didn't closely follow the show!!!!
Ernie was a foster child of a couple by the last name of Thompson. He was befriended first by Chip, and as I recall from some episodes, seemed to be in Chip's class in school. Eventually the Thompsons had to move away from Bryant Park, and because they hadn't legally adopted Ernie, they couldn't take him with them, and that opened the door for the Douglas family to become his new foster family, and for Steve ( after a period of time ), to adopt him making Ernest Thompson, Ernest Douglas!!!! ( I wish I could find a way to put this on google )!!!!