Lopez played the first five innings of the game and went 0-for-2 with a walk against St. Louis right-hander Adam Wainwright. For the season, he is hitting .243 with six home runs and 41 RBIs.
Lopez has been bothered by the problem for at least a week after bumping his knee on a table while playing with his daughters.
"The knee got inflamed," Lopez said. "It's nothing big. I just need a little rest."
Lopez is not sure if he will be able to play the opener of the four-game series against the Giants on Monday night.
"We'll see," he said. "It will depend on what the trainer has to say."
Bill Ladson is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.