BAYHAQI 5378:
from Yaʿlá b. Umayyah —
[Machine] I said to Umar ibn al-Khattab, "The saying of Allah (Exalted is He): 'There is no sin upon you if you shorten the prayer when you fear that those who disbelieve may harm you' (Quran 4:101) and people have been granted security." He said, "I am amazed at what you are amazed at," so I asked the Prophet ﷺ about it. He said, "It is a charity that Allah bestows upon you, so accept His charity." This is the wording of the hadith of Ibn Idris. In the hadith of Abu Asim, he said, "I said to Umar ibn al-Khattab, 'Allah (Glorified and Exalted is He) says: "There is no sin upon you if you shorten the prayer when you fear that those who disbelieve may harm you" (Quran 4:101).' At the end of it, he said, 'It is a charity that Allah bestows upon you, so accept it.'"
البيهقي ٥٣٧٨:
عن يعلى بن اميه —
قُلْتُ لِعُمَرَ ؓ قَوْلُهُ تَعَالَى {لَيْسَ عَلَيْكُمْ جُنَاحٌ أَنْ تَقْصُرُوا مِنَ الصَّلَاةِ إِنْ خِفْتُمْ أَنْ يَفْتِنَكُمُ الَّذِينَ كَفَرُوا} وَقَدْ أَمِنَ النَّاسُ قَالَ عَجِبْتُ مِمَّا عَجِبْتَ مِنْهُ فَسَأَلْتُ النَّبِيَّ ﷺ فَقَالَ صَدَقَةٌ تَصَدَّقَ اللهُ بِهَا عَلَيْكُمْ فَاقْبَلُوا صَدَقَتَهُ لَفْظُ حَدِيثِ ابْنِ إِدْرِيسَ وَفِي حَدِيثِ أَبِي عَاصِمٍ قَالَ قُلْتُ لِعُمَرَ بْنِ الْخَطَّابِ ؓ قَالَ اللهُ ﷻ {أَنْ تَقْصُرُوا مِنَ الصَّلَاةِ إِنْ خِفْتُمْ أَنْ يَفْتِنَكُمُ الَّذِينَ كَفَرُوا} [النساء 101] وَفِي آخِرِهِ فَقَالَ صَدَقَةُ اللهِ عَلَيْكُمْ فَاقْبَلُوهَا
hadithunlocked.com