The only authentic source of Islam beyond any doubts is the Infallible Quran when it comes to the beliefs. Ahadith are great source of religion and provide supportive evidences but cannot be accepted as independent sources specially when they contain a message contradicting the Quran.All great scholars of the past have consensus on this principle and we also adhere to these principles too.
Please, have a look at these verses of the Quran and make up your own mind;
As for those whom He [i.e. God] selects as His messengers, He guards them – from front and from behind – so that it is ascertained that they have delivered the messages of their Lord. – Al Jinn 72: 27 – 28
O Messenger, deliver that which has been revealed to you from your Lord; if you do it not then you would not have delivered His message. And [do not fear your enemies,] Allah shall protect you against these people. – Al Ma’idah 5: 67
The above two verses, refer mainly to the protection of the Prophet (pbuh) while he was delivering the Divine Message. He would be protected in such a way that he delivers the Message perfectly.Whilst keeping this in mind it should be clear that the Prophet (pbuh) could still have got hurt like he did at Ta’if and the battle of Uhud. When the Prophet (pbuh) was promised that God would protect him from the people, his physical injuries or harm to body was not being referred to. Afterall Prophet(pbuh)) fell ill a few times in his life in addition to receiving bodily harms during battles.
Prophet(pbuh) getting hurt or falling ill should not be seen as negative. On the contrary, it may be viewed as positive. This has many reasons. The fact that a person is able to come on the battle field and strike the Prophet (pbuh) so hard and yet not succeed in taking his life must surely have been utterly displeasing to the Prophet’s (pbuh) enemies. Prophet(pbuh)was at the forefront of all these battles and his enemies came so close so often and yet remained unsuccessful in achieving their goal.It also showed the people’s despicable attitude; that they not only rejected a Messenger of God after he had made the truth as clear as day light but actually would go as far as injuring him and attempting to murder him. Furthermore, battle of Uhud was an occasion of testing the believers to see how they would react. There were some who lost all hope and began to flee but then there were others who remained firm. What is important to notice here is that none of these injuries did anything to message of God or its safe deliverance.
When we talk of the Prophet (pbuh) being under magic spells, it is indirectly putting doubts in the message which The Prophet(pbuh) was to deliver.Are we saying that for six months(according to the the quoted hadith) He did not remain infallible or was not even acting as prophet of God(God forbid). It is totally unacceptable and is against the teachings of Quran.