Brandon Smith is pulling out of "Skating with the Stars" -- for the rest of the season -- because of the illness that forced him to miss the show last week ... TMZ has learned.
As TMZ first reported, Smith skipped last week's show after he started throwing up on set. A rep for the show told us at the time it was food poisoning.
We're told Smith has not been officially diagnosed and is still awaiting test results. Sources close to the "Sonny with a Chance" star tell us he is weak and barely able to stand.
UPDATE: Smith will appear on the show tonight to reveal the details of his condition.