Undefined property: WP_Post_Type::$term_id

(1/1) ErrorException

Undefined property: WP_Post_Type::$term_id

in taxonomy.php line 1709
at RegisterExceptionHandler->handleError()in taxonomy.php line 1709
at sanitize_term()in taxonomy.php line 990
at get_term()in rest-api.php line 3228
at rest_get_route_for_term()in rest-api.php line 3296
at rest_get_queried_resource_route()in rest-api.php line 1065
at rest_output_link_header()in class-wp-hook.php line 322
at WP_Hook->apply_filters()in class-wp-hook.php line 348
at WP_Hook->do_action()in plugin.php line 517
at do_action()in template-loader.php line 13
at require_once('/home/pan/domains/pan.pl/public_html/web/wp/wp-includes/template-loader.php')in wp-blog-header.php line 19
at require('/home/pan/domains/pan.pl/public_html/web/wp/wp-blog-header.php')in index.php line 7