Imam Hasan Al-Basri {May Allah send His Divine Mercy upon him} said:
“One who acts without knowledge is like one who travels off the path; and the one who acts without knowledge corrupts more than he rectifies.
So seek knowledge in a way that does not harm your worship, and seek to worship in a way that does not harm your knowledge.
For verily, there were people {Khawarij} who sought to worship, but they abandoned knowledge until they attacked the community of Muhammad with their swords.
However, if they had truly sought knowledge, it would not have directed them to do what they did.
العامل على غير علم كالسالك على غير طريق، والعامل على غير علم مايصلح أكثر مما يفسد، فاطلبوا العلم طلبا لاتضروا بالعبادة واطلبوا
العبادة طلبا لاتضروا بالعلم، فإن قوما طلبوا العبادة وتركوا العلم فخرجوا بأسيافهم على أمة محمد -صلى الله عليه وسلم- ولو طلبوا العلم لم يدلهم على ذلك.
{Jami ‘Bayan al-‘Ilm wa Fadlihi wa Ma Yanbaghi fi Riwayatihi wa Hamlihi ~ The Comprehensive Exposition of Knowledge and its Excellence and That Which Needs to Implemented in Regard to Knowledge and its Excellence}