We do not espouse a doctrine of infallibility of prophets. It is a common ploy in anti-Mormon literature to argue that the Church is false because of a supposed error or the disaffection of one holding the prophetic office.
All who come into mortality-the Savior included-are subject to the temptations of the father of lies, are open to the enticements of the flesh, even those specially selected and designated as the Lord’s mouthpieces.
“With all their inspiration and greatness, prophets are yet mortal men with imperfections common to mankind in general. They have their opinions and prejudices and are left to work out their own problems without inspiration in many instances.”
(Bruce R. McConkie, Mormon Doctrine, p. 608.)
The commandment is given to high and low, great and small, to take heed to themselves lest they fall and succumb to temptation.