Error thrown

Call to a member function using_index_permalinks() on null