Saydna Ibn Abbas رضیﷲ عنه said:
مَنْ أَفْتَى بِفُتْيَا يَعْمَى فِيهَا فَإِنَّمَا إِثْمُهَا عَلَيْه
The one who issues a verdict (fatwa) which is based upon deviancy or it may deceive, then the sin will be upon the giver of the verdict (fatwa).
[Jami bayan al Ilm by ibn Abd Al Barr #1010] sanad Hasan, Imam Zubair Ali Zai رحمہ اللہ
Allama Ibn al Qayyim رحمہ اللہ said:
مَنْ أَفْتَى النَّاسَ وَلَيْسَ بِأَهْلٍ لِلْفَتْوَى فَهُوَ آثِمٌ عَاصٍ،
Whoever issues a verdict to the people, whilst he is laysa bi ahlil fatwa (ie: not qualified to do so), then he is sinful and disobedient,
وَمَنْ أَقَرَّهُ مَنْ وُلَاةِ الْأُمُورِ عَلَى ذَلِكَ فَهُوَ آثِمٌ أَيْضًا.
And whoever establishes him as a Mufti from the leaders, then he is also sinful.
[Alam al Muaqqiyeen an Rab al Aalameen 4/166]