Undefined offset: 0 (500 Internal Server Error)
Symfony Exception
Exception
ErrorException
in
/var/www/wordpress/wp-includes/class-wp-query.php
(line 3643)
public function next_post() {
++$this->current_post;
/** @var WP_Post */
$this->post = $this->posts[ $this->current_post ];
return $this->post;
}
/**
* Sets up the current post.
in
/var/www/wordpress/wp-content/plugins/syslink-wp/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php
->
handleError
(line 47)
protected function registerErrorHandling()
{
error_reporting(-1);
set_error_handler(function ($level, $message, $file = '', $line = 0) {
$this->handleError($level, $message, $file, $line);
});
set_exception_handler(function ($e) {
$this->handleException($e);
});
Application->Laravel\Lumen\Concerns\{closure}(8, 'Undefined offset: 0', '/var/www/wordpress/wp-includes/class-wp-query.php', 3643, array())
in
/var/www/wordpress/wp-includes/class-wp-query.php
(line 3643)
public function next_post() {
++$this->current_post;
/** @var WP_Post */
$this->post = $this->posts[ $this->current_post ];
return $this->post;
}
/**
* Sets up the current post.
* @param WP_Query $query The WP_Query instance (passed by reference).
*/
do_action_ref_array( 'loop_start', array( &$this ) );
}
$post = $this->next_post();
$this->setup_postdata( $post );
}
/**
* Determines whether there are more posts available in the loop.
if ( ! isset( $wp_query ) ) {
return;
}
$wp_query->the_post();
}
/*
* Comments loop.
*/
the_post()
in
/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php
(line 20)
elseif ( is_author() ) :
/* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
*/
the_post();
printf( __( 'Author Archives: %s', 'flatsome' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php')
in
/var/www/wordpress/wp-includes/template.php
(line 812)
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php', false, array())
in
/var/www/wordpress/wp-includes/template.php
(line 745)
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
locate_template(array('template-parts/posts/partials/archive-title.php'), true, false, array())
in
/var/www/wordpress/wp-includes/general-template.php
(line 206)
* @param string[] $templates Array of template files to search for, in order.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'get_template_part', $slug, $name, $templates, $args );
if ( ! locate_template( $templates, true, false, $args ) ) {
return false;
}
}
/**
get_template_part('template-parts/posts/partials/archive-title')
in
/var/www/wordpress/wp-content/themes/flatsome/inc/structure/structure-posts.php
(line 64)
// Add Blog Archive title
function flatsome_archive_title() {
if ( get_theme_mod( 'blog_archive_title', 1 ) && ( is_archive() || is_search() ) ) {
get_template_part( 'template-parts/posts/partials/archive-title' );
}
}
add_action( 'flatsome_before_blog', 'flatsome_archive_title', 15 );
// 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'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
WP_Hook->apply_filters('', array(''))
in
/var/www/wordpress/wp-includes/class-wp-hook.php
(line 348)
*
* @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 );
}
/**
do_action('flatsome_before_blog')
in
/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php
(line 2)
<?php
do_action('flatsome_before_blog');
?>
<?php if(!is_single() && flatsome_option('blog_featured') == 'top'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<div class="row row-large <?php if(flatsome_option('blog_layout_divider')) echo 'row-divided ';?>">
require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php')
in
/var/www/wordpress/wp-includes/template.php
(line 812)
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php', false, array())
in
/var/www/wordpress/wp-includes/template.php
(line 745)
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
locate_template(array('template-parts/posts/layout-right-sidebar.php', 'template-parts/posts/layout.php'), true, false, array())
in
/var/www/wordpress/wp-includes/general-template.php
(line 206)
* @param string[] $templates Array of template files to search for, in order.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'get_template_part', $slug, $name, $templates, $args );
if ( ! locate_template( $templates, true, false, $args ) ) {
return false;
}
}
/**
get_template_part('template-parts/posts/layout', 'right-sidebar')
in
/var/www/wordpress/wp-content/themes/flatsome/index.php
(line 13)
get_header();
?>
<div id="content" class="blog-wrapper blog-archive page-wrapper">
<?php get_template_part( 'template-parts/posts/layout', get_theme_mod('blog_layout','right-sidebar') ); ?>
</div>
<?php get_footer(); ?>
include('/var/www/wordpress/wp-content/themes/flatsome/index.php')
in
/var/www/wordpress/wp-includes/template-loader.php
(line 106)
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
require_once('/var/www/wordpress/wp-includes/template-loader.php')
in
/var/www/wordpress/wp-blog-header.php
(line 19)
// 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';
Stack Trace
ErrorException
ErrorException:
Undefined offset: 0
at /var/www/wordpress/wp-includes/class-wp-query.php:3643
at Laravel\Lumen\Application->handleError(8, 'Undefined offset: 0', '/var/www/wordpress/wp-includes/class-wp-query.php', 3643)
(/var/www/wordpress/wp-content/plugins/syslink-wp/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(8, 'Undefined offset: 0', '/var/www/wordpress/wp-includes/class-wp-query.php', 3643, array())
(/var/www/wordpress/wp-includes/class-wp-query.php:3643)
at WP_Query->next_post()
(/var/www/wordpress/wp-includes/class-wp-query.php:3686)
at WP_Query->the_post()
(/var/www/wordpress/wp-includes/query.php:1005)
at the_post()
(/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php:20)
at require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php')
(/var/www/wordpress/wp-includes/template.php:812)
at load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php', false, array())
(/var/www/wordpress/wp-includes/template.php:745)
at locate_template(array('template-parts/posts/partials/archive-title.php'), true, false, array())
(/var/www/wordpress/wp-includes/general-template.php:206)
at get_template_part('template-parts/posts/partials/archive-title')
(/var/www/wordpress/wp-content/themes/flatsome/inc/structure/structure-posts.php:64)
at flatsome_archive_title('')
(/var/www/wordpress/wp-includes/class-wp-hook.php:324)
at WP_Hook->apply_filters('', array(''))
(/var/www/wordpress/wp-includes/class-wp-hook.php:348)
at WP_Hook->do_action(array(''))
(/var/www/wordpress/wp-includes/plugin.php:517)
at do_action('flatsome_before_blog')
(/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php:2)
at require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php')
(/var/www/wordpress/wp-includes/template.php:812)
at load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php', false, array())
(/var/www/wordpress/wp-includes/template.php:745)
at locate_template(array('template-parts/posts/layout-right-sidebar.php', 'template-parts/posts/layout.php'), true, false, array())
(/var/www/wordpress/wp-includes/general-template.php:206)
at get_template_part('template-parts/posts/layout', 'right-sidebar')
(/var/www/wordpress/wp-content/themes/flatsome/index.php:13)
at include('/var/www/wordpress/wp-content/themes/flatsome/index.php')
(/var/www/wordpress/wp-includes/template-loader.php:106)
at require_once('/var/www/wordpress/wp-includes/template-loader.php')
(/var/www/wordpress/wp-blog-header.php:19)
at require('/var/www/wordpress/wp-blog-header.php')
(/var/www/wordpress/index.php:17)
Symfony Exception
Exception
ErrorException
in
/var/www/wordpress/wp-includes/class-wp-query.php
(line 3643)
public function next_post() {
++$this->current_post;
/** @var WP_Post */
$this->post = $this->posts[ $this->current_post ];
return $this->post;
}
/**
* Sets up the current post.
in
/var/www/wordpress/wp-content/plugins/syslink-wp/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php
->
handleError
(line 47)
protected function registerErrorHandling()
{
error_reporting(-1);
set_error_handler(function ($level, $message, $file = '', $line = 0) {
$this->handleError($level, $message, $file, $line);
});
set_exception_handler(function ($e) {
$this->handleException($e);
});
Application->Laravel\Lumen\Concerns\{closure}(8, 'Undefined offset: 0', '/var/www/wordpress/wp-includes/class-wp-query.php', 3643, array())
in
/var/www/wordpress/wp-includes/class-wp-query.php
(line 3643)
public function next_post() {
++$this->current_post;
/** @var WP_Post */
$this->post = $this->posts[ $this->current_post ];
return $this->post;
}
/**
* Sets up the current post.
* @param WP_Query $query The WP_Query instance (passed by reference).
*/
do_action_ref_array( 'loop_start', array( &$this ) );
}
$post = $this->next_post();
$this->setup_postdata( $post );
}
/**
* Determines whether there are more posts available in the loop.
if ( ! isset( $wp_query ) ) {
return;
}
$wp_query->the_post();
}
/*
* Comments loop.
*/
the_post()
in
/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php
(line 20)
elseif ( is_author() ) :
/* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
*/
the_post();
printf( __( 'Author Archives: %s', 'flatsome' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php')
in
/var/www/wordpress/wp-includes/template.php
(line 812)
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php', false, array())
in
/var/www/wordpress/wp-includes/template.php
(line 745)
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
locate_template(array('template-parts/posts/partials/archive-title.php'), true, false, array())
in
/var/www/wordpress/wp-includes/general-template.php
(line 206)
* @param string[] $templates Array of template files to search for, in order.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'get_template_part', $slug, $name, $templates, $args );
if ( ! locate_template( $templates, true, false, $args ) ) {
return false;
}
}
/**
get_template_part('template-parts/posts/partials/archive-title')
in
/var/www/wordpress/wp-content/themes/flatsome/inc/structure/structure-posts.php
(line 64)
// Add Blog Archive title
function flatsome_archive_title() {
if ( get_theme_mod( 'blog_archive_title', 1 ) && ( is_archive() || is_search() ) ) {
get_template_part( 'template-parts/posts/partials/archive-title' );
}
}
add_action( 'flatsome_before_blog', 'flatsome_archive_title', 15 );
// 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'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
WP_Hook->apply_filters('', array(''))
in
/var/www/wordpress/wp-includes/class-wp-hook.php
(line 348)
*
* @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 );
}
/**
do_action('flatsome_before_blog')
in
/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php
(line 2)
<?php
do_action('flatsome_before_blog');
?>
<?php if(!is_single() && flatsome_option('blog_featured') == 'top'){ get_template_part('template-parts/posts/featured-posts'); } ?>
<div class="row row-large <?php if(flatsome_option('blog_layout_divider')) echo 'row-divided ';?>">
require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php')
in
/var/www/wordpress/wp-includes/template.php
(line 812)
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php', false, array())
in
/var/www/wordpress/wp-includes/template.php
(line 745)
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
locate_template(array('template-parts/posts/layout-right-sidebar.php', 'template-parts/posts/layout.php'), true, false, array())
in
/var/www/wordpress/wp-includes/general-template.php
(line 206)
* @param string[] $templates Array of template files to search for, in order.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'get_template_part', $slug, $name, $templates, $args );
if ( ! locate_template( $templates, true, false, $args ) ) {
return false;
}
}
/**
get_template_part('template-parts/posts/layout', 'right-sidebar')
in
/var/www/wordpress/wp-content/themes/flatsome/index.php
(line 13)
get_header();
?>
<div id="content" class="blog-wrapper blog-archive page-wrapper">
<?php get_template_part( 'template-parts/posts/layout', get_theme_mod('blog_layout','right-sidebar') ); ?>
</div>
<?php get_footer(); ?>
include('/var/www/wordpress/wp-content/themes/flatsome/index.php')
in
/var/www/wordpress/wp-includes/template-loader.php
(line 106)
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
require_once('/var/www/wordpress/wp-includes/template-loader.php')
in
/var/www/wordpress/wp-blog-header.php
(line 19)
// 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';
Stack Trace
ErrorException
|
---|
ErrorException: Undefined offset: 0 at /var/www/wordpress/wp-includes/class-wp-query.php:3643 at Laravel\Lumen\Application->handleError(8, 'Undefined offset: 0', '/var/www/wordpress/wp-includes/class-wp-query.php', 3643) (/var/www/wordpress/wp-content/plugins/syslink-wp/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47) at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(8, 'Undefined offset: 0', '/var/www/wordpress/wp-includes/class-wp-query.php', 3643, array()) (/var/www/wordpress/wp-includes/class-wp-query.php:3643) at WP_Query->next_post() (/var/www/wordpress/wp-includes/class-wp-query.php:3686) at WP_Query->the_post() (/var/www/wordpress/wp-includes/query.php:1005) at the_post() (/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php:20) at require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php') (/var/www/wordpress/wp-includes/template.php:812) at load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/partials/archive-title.php', false, array()) (/var/www/wordpress/wp-includes/template.php:745) at locate_template(array('template-parts/posts/partials/archive-title.php'), true, false, array()) (/var/www/wordpress/wp-includes/general-template.php:206) at get_template_part('template-parts/posts/partials/archive-title') (/var/www/wordpress/wp-content/themes/flatsome/inc/structure/structure-posts.php:64) at flatsome_archive_title('') (/var/www/wordpress/wp-includes/class-wp-hook.php:324) at WP_Hook->apply_filters('', array('')) (/var/www/wordpress/wp-includes/class-wp-hook.php:348) at WP_Hook->do_action(array('')) (/var/www/wordpress/wp-includes/plugin.php:517) at do_action('flatsome_before_blog') (/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php:2) at require('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php') (/var/www/wordpress/wp-includes/template.php:812) at load_template('/var/www/wordpress/wp-content/themes/flatsome/template-parts/posts/layout-right-sidebar.php', false, array()) (/var/www/wordpress/wp-includes/template.php:745) at locate_template(array('template-parts/posts/layout-right-sidebar.php', 'template-parts/posts/layout.php'), true, false, array()) (/var/www/wordpress/wp-includes/general-template.php:206) at get_template_part('template-parts/posts/layout', 'right-sidebar') (/var/www/wordpress/wp-content/themes/flatsome/index.php:13) at include('/var/www/wordpress/wp-content/themes/flatsome/index.php') (/var/www/wordpress/wp-includes/template-loader.php:106) at require_once('/var/www/wordpress/wp-includes/template-loader.php') (/var/www/wordpress/wp-blog-header.php:19) at require('/var/www/wordpress/wp-blog-header.php') (/var/www/wordpress/index.php:17) |