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