Call to a member function getCategoryTree() on bool