Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined property: WP_Post_Type::$term_id

Exception

ErrorException

Show exception properties
ErrorException {#25228
  #severity: E_WARNING
}
  1. function sanitize_term$term$taxonomy$context 'display' ) {
  2.     $fields = array( 'term_id''name''description''slug''count''parent''term_group''term_taxonomy_id''object_id' );
  3.     $do_object is_object$term );
  4.     $term_id $do_object $term->term_id : ( isset( $term['term_id'] ) ? $term['term_id'] : );
  5.     foreach ( (array) $fields as $field ) {
  6.         if ( $do_object ) {
  7.             if ( isset( $term->$field ) ) {
  8.                 $term->$field sanitize_term_field$field$term->$field$term_id$taxonomy$context );
  1.      * @throws \ErrorException
  2.      */
  3.     public function handleError($level$message$file ''$line 0$context = [])
  4.     {
  5.         try {
  6.             parent::handleError($level$message$file$line$context);
  7.         } catch (Throwable $e) {
  8.             if (! apply_filters('acorn/throw_error_exception'true$e)) {
  9.                 return false;
  10.             }
HandleExceptions->handleError() in /var/www/vhosts/lesting.org/httpdocs/wp-includes/taxonomy.php (line 1683)
  1. function sanitize_term$term$taxonomy$context 'display' ) {
  2.     $fields = array( 'term_id''name''description''slug''count''parent''term_group''term_taxonomy_id''object_id' );
  3.     $do_object is_object$term );
  4.     $term_id $do_object $term->term_id : ( isset( $term['term_id'] ) ? $term['term_id'] : );
  5.     foreach ( (array) $fields as $field ) {
  6.         if ( $do_object ) {
  7.             if ( isset( $term->$field ) ) {
  8.                 $term->$field sanitize_term_field$field$term->$field$term_id$taxonomy$context );
  1.     if ( $term instanceof WP_Term ) {
  2.         $_term $term;
  3.     } elseif ( is_object$term ) ) {
  4.         if ( empty( $term->filter ) || 'raw' === $term->filter ) {
  5.             $_term sanitize_term$term$taxonomy'raw' );
  6.             $_term = new WP_Term$_term );
  7.         } else {
  8.             $_term WP_Term::get_instance$term->term_id );
  9.         }
  10.     } else {
  1.  * @param int|WP_Term $term Term ID or term object.
  2.  * @return string The route path with a leading slash for the given term,
  3.  *                or an empty string if there is not a route.
  4.  */
  5. function rest_get_route_for_term$term ) {
  6.     $term get_term$term );
  7.     if ( ! $term instanceof WP_Term ) {
  8.         return '';
  9.     }
  1.  */
  2. function rest_get_queried_resource_route() {
  3.     if ( is_singular() ) {
  4.         $route rest_get_route_for_postget_queried_object() );
  5.     } elseif ( is_category() || is_tag() || is_tax() ) {
  6.         $route rest_get_route_for_termget_queried_object() );
  7.     } elseif ( is_author() ) {
  8.         $route '/wp/v2/users/' get_queried_object_id();
  9.     } else {
  10.         $route '';
  11.     }
rest_get_queried_resource_route() in /var/www/vhosts/lesting.org/httpdocs/wp-includes/rest-api.php (line 1036)
  1.         return;
  2.     }
  3.     headersprintf'Link: <%s>; rel="https://api.w.org/"'sanitize_url$api_root ) ), false );
  4.     $resource rest_get_queried_resource_route();
  5.     if ( $resource ) {
  6.         headersprintf'Link: <%s>; rel="alternate"; type="application/json"'sanitize_urlrest_url$resource ) ) ), false );
  7.     }
  8. }
  1.                     $args[0] = $value;
  2.                 }
  3.                 // Avoid the array_slice() if possible.
  4.                 if ( === $the_['accepted_args'] ) {
  5.                     $value call_user_func$the_['function'] );
  6.                 } elseif ( $the_['accepted_args'] >= $num_args ) {
  7.                     $value call_user_func_array$the_['function'], $args );
  8.                 } else {
  9.                     $value call_user_func_array$the_['function'], array_slice$args0$the_['accepted_args'] ) );
  10.                 }
  1.      *
  2.      * @param array $args Parameters to pass to the callback functions.
  3.      */
  4.     public function do_action$args ) {
  5.         $this->doing_action true;
  6.         $this->apply_filters''$args );
  7.         // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
  8.         if ( ! $this->nesting_level ) {
  9.             $this->doing_action false;
  10.         }
  1.     } elseif ( is_array$arg[0] ) && === count$arg[0] ) && isset( $arg[0][0] ) && is_object$arg[0][0] ) ) {
  2.         // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
  3.         $arg[0] = $arg[0][0];
  4.     }
  5.     $wp_filter$hook_name ]->do_action$arg );
  6.     array_pop$wp_current_filter );
  7. }
  8. /**
  1.     /**
  2.      * Fires before determining which template to load.
  3.      *
  4.      * @since 1.5.0
  5.      */
  6.     do_action'template_redirect' );
  7. }
  8. /**
  9.  * Filters whether to allow 'HEAD' requests to generate content.
  10.  *
require_once('/var/www/vhosts/lesting.org/httpdocs/wp-includes/template-loader.php') in /var/www/vhosts/lesting.org/httpdocs/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once ABSPATH WPINC '/template-loader.php';
  5. }
require('/var/www/vhosts/lesting.org/httpdocs/wp-blog-header.php') in /var/www/vhosts/lesting.org/httpdocs/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

Stack Trace

ErrorException
ErrorException:
Undefined property: WP_Post_Type::$term_id

  at /var/www/vhosts/lesting.org/httpdocs/wp-includes/taxonomy.php:1683
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
     (/var/www/vhosts/lesting.org/httpdocs/wp-content/themes/lmc-wp-orga-theme/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:49)
  at Roots\Acorn\Bootstrap\HandleExceptions->handleError()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/taxonomy.php:1683)
  at sanitize_term()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/taxonomy.php:965)
  at get_term()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/rest-api.php:3189)
  at rest_get_route_for_term()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/rest-api.php:3257)
  at rest_get_queried_resource_route()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/rest-api.php:1036)
  at rest_output_link_header()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/class-wp-hook.php:322)
  at WP_Hook->apply_filters()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/class-wp-hook.php:348)
  at WP_Hook->do_action()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/plugin.php:517)
  at do_action()
     (/var/www/vhosts/lesting.org/httpdocs/wp-includes/template-loader.php:13)
  at require_once('/var/www/vhosts/lesting.org/httpdocs/wp-includes/template-loader.php')
     (/var/www/vhosts/lesting.org/httpdocs/wp-blog-header.php:19)
  at require('/var/www/vhosts/lesting.org/httpdocs/wp-blog-header.php')
     (/var/www/vhosts/lesting.org/httpdocs/index.php:17)