Ryan Lindley is back as the starter, and Drew Stanton has been treated for an infection in his sprained right knee, a setback in his attempt to return for the playoffs.

Coach Bruce Arians initially said rookie Logan Thomas would start in Sunday's regular-season finale at San Francisco. But he said Friday he changed his mind based on Thomas' performances in practice.

"I was hoping that he (Thomas) was going to be able to handle it," Arians said, "but it's not the time right now."

Stanton, who has missed the last two games, experienced swelling in his knee on Wednesday. Arthroscopic surgery was performed Wednesday night to flush out the knee and treat it with antibiotics.

Arians wouldn't talk about the infection, but said Stanton remains "on schedule for next week."

"He's at home and will stay there and rehab over the weekend and be ready to go next week, hopefully," Arians said.

Thomas, a fourth-round draft pick from Virginia Tech, would have been Arizona's fourth starting quarterback of the season. Arians had said the rookie would have a very short "hook," and that turned out to be true. He was removed from the starting job after one practice.

"The ball wasn't in spots it needed to be," Arians said. "He was throwing it well, but not to the right guys. He just hasn't had enough reps to be able to go against this defense, which is one of the best five defenses in the National Football League. It was probably a poor decision on my part to early announce it. ... We'll do what we need to do to win the football game and that's to start Ryan."

Arizona (11-4) still has an outside chance to win the NFC West, but St. Louis would have to beat the Seahawks in Seattle while the Cardinals win at San Francisco.

Oddsmakers expect neither to occur. The Rams are 12 1/2-point underdogs in Seattle, the 49ers a 6 1/2-point pick over Arizona.

The most likely outcome would have the Cardinals the No. 5 seed with a first-round playoff game at either Carolina or Atlanta.

Lindley, signed off the San Diego practice squad after Carson Palmer went down with a season-ending knee injury, started last Sunday night at Seattle and was unimpressive. The third-year quarterback from San Diego State completing 18 of 44 passes for 216 yards in the Cardinals' 35-6 loss.

For the second straight game, Arizona didn't score a touchdown. Lindley has the dubious NFL record of most passes without a touchdown (225).

Arians said the offense's woes were not all Lindley's fault, citing dropped passes and penalties. Lindley, the coach said, "did not go out and lose the ballgame."

A running game would certainly help.

After rushing for a combined 175 yards the previous two games, Kerwynn Williams gained 4 yards in two carries against Seattle. Arians said he expects the slashing running back to see more action against the 49ers.

"That was kind of rough," Williams said. "But I expect us to be better this week and try to get back on track."