The Messenger of Allah ﷺ said, "Seeking knowledge is an obligation upon every Muslim, and the one who places knowledge with those unworthy of it is like one who adorns swine with jewels, pearls, and gold."
حدثنا هشام بن عمار حدثنا حفص بن سليمان حدثنا كثير بن شنظير عن محمد بن سيرين
قال رسول الله ﷺ طلب العلم فريضة على كل مسلم وواضع العلم عند غير أهله كمقلد الخنازير الجوهر واللؤلؤ والذهب
No references are available.
[Its chain of transmission is very daif] * Hafs was mentioned earlier, no. 216, and it has several routes of transmission, all of them daif.