Error thrown

Call to a member function get_category_ids() on boolean