وقد روى أنه لا بأس بذلك لان الذي يصلي له أقرب إليه من ذلك
And it has also been narrated that there is no harm in that, because the One عز وجل to whom the prayer is directed is nearer to him than the object (such as the fire or lamp) in front of him.