Concerning the verse "And We did not make the vision which We showed you anything but a trial for the people" [Isra 17:60], he said, "It was a vision seen with the eye, shown to the Messenger of Allah ﷺ on the night he was taken to Bayt al-Maqdis."He continued, "Allah, the Exalted, then said, 'and the tree cursed in the Quran' [Isra 17:60]." He explained, "That is the tree of Zaqqum."
{وما جعلنا الرؤيا يا التي أرينك إلا فتنة للناس} [الإسراء: ٦٠] قال: هي رؤيا عين أريها رسول الله ﷺ ليلة أسري به إلى بيت المقدس. قال: قال تعالى: {والشجرة الملعونة في القرءان} [الإسراء: ٦٠] قال: هي شجرة الزقوم.
Bukhari narrated it in the Merits of the Ansar (3888), from Humaydi, who said, Sufyan narrated to us, Amr narrated to us, from Ikrima, from Ibn Abbas, who related it.It has been said that this vision has no connection to the Night Journey, because the Night Journey took place while awake. For this reason, Ikrima explained that the vision mentioned in this verse refers to entering Masjid al-Haram, and that the trial refers to being turned back at Hudaybiya. Qurtubi mentioned this in al-Mufhim (1/385).