Undefined offset: 0 (500 Internal Server Error)

Symfony Exception

Undefined offset: 0

Exception

ErrorException

  1.     public function next_post() {
  2.         ++$this->current_post;
  3.         /** @var WP_Post */
  4.         $this->post $this->posts$this->current_post ];
  5.         return $this->post;
  6.     }
  7.     /**
  8.      * Sets up the current post.
  1.     protected function registerErrorHandling()
  2.     {
  3.         error_reporting(-1);
  4.         set_error_handler(function ($level$message$file ''$line 0) {
  5.             $this->handleError($level$message$file$line);
  6.         });
  7.         set_exception_handler(function ($e) {
  8.             $this->handleException($e);
  9.         });
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)
  1.     public function next_post() {
  2.         ++$this->current_post;
  3.         /** @var WP_Post */
  4.         $this->post $this->posts$this->current_post ];
  5.         return $this->post;
  6.     }
  7.     /**
  8.      * Sets up the current post.
WP_Query->next_post() in /var/www/wordpress/wp-includes/class-wp-query.php (line 3686)
  1.              * @param WP_Query $query The WP_Query instance (passed by reference).
  2.              */
  3.             do_action_ref_array'loop_start', array( &$this ) );
  4.         }
  5.         $post $this->next_post();
  6.         $this->setup_postdata$post );
  7.     }
  8.     /**
  9.      * Determines whether there are more posts available in the loop.
WP_Query->the_post() in /var/www/wordpress/wp-includes/query.php (line 1005)
  1.     if ( ! isset( $wp_query ) ) {
  2.         return;
  3.     }
  4.     $wp_query->the_post();
  5. }
  6. /*
  7.  * Comments loop.
  8.  */
  1.             elseif ( is_author() ) :
  2.                 /* Queue the first post, that way we know
  3.                  * what author we're dealing with (if that is the case).
  4.                 */
  5.                 the_post();
  6.                 printf__'Author Archives: %s''flatsome' ), '<span class="vcard"><a class="url fn n" href="' esc_urlget_author_posts_urlget_the_author_meta'ID' ) ) ) . '" title="' esc_attrget_the_author() ) . '" rel="me">' get_the_author() . '</a></span>' );
  7.                 /* Since we called the_post() above, we need to
  8.                  * rewind the loop back to the beginning that way
  9.                  * we can run the loop properly, in full.
  10.                  */
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)
  1.     do_action'wp_before_load_template'$_template_file$load_once$args );
  2.     if ( $load_once ) {
  3.         require_once $_template_file;
  4.     } else {
  5.         require $_template_file;
  6.     }
  7.     /**
  8.      * Fires after a template file is loaded.
  9.      *
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)
  1.             break;
  2.         }
  3.     }
  4.     if ( $load && '' !== $located ) {
  5.         load_template$located$load_once$args );
  6.     }
  7.     return $located;
  8. }
locate_template(array('template-parts/posts/partials/archive-title.php'), true, false, array()) in /var/www/wordpress/wp-includes/general-template.php (line 206)
  1.      * @param string[] $templates Array of template files to search for, in order.
  2.      * @param array    $args      Additional arguments passed to the template.
  3.      */
  4.     do_action'get_template_part'$slug$name$templates$args );
  5.     if ( ! locate_template$templatestruefalse$args ) ) {
  6.         return false;
  7.     }
  8. }
  9. /**
get_template_part('template-parts/posts/partials/archive-title') in /var/www/wordpress/wp-content/themes/flatsome/inc/structure/structure-posts.php (line 64)
  1. // Add Blog Archive title
  2. function flatsome_archive_title() {
  3.     if ( get_theme_mod'blog_archive_title') && ( is_archive() || is_search() ) ) {
  4.         get_template_part'template-parts/posts/partials/archive-title' );
  5.     }
  6. }
  7. add_action'flatsome_before_blog''flatsome_archive_title'15 );
flatsome_archive_title('') in /var/www/wordpress/wp-includes/class-wp-hook.php (line 324)
  1.                 // Avoid the array_slice() if possible.
  2.                 if ( === $the_['accepted_args'] ) {
  3.                     $value call_user_func$the_['function'] );
  4.                 } elseif ( $the_['accepted_args'] >= $num_args ) {
  5.                     $value call_user_func_array$the_['function'], $args );
  6.                 } else {
  7.                     $value call_user_func_array$the_['function'], array_slice$args0$the_['accepted_args'] ) );
  8.                 }
  9.             }
  10.         } while ( false !== next$this->iterations$nesting_level ] ) );
WP_Hook->apply_filters('', array('')) in /var/www/wordpress/wp-includes/class-wp-hook.php (line 348)
  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.         }
WP_Hook->do_action(array('')) in /var/www/wordpress/wp-includes/plugin.php (line 517)
  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. <?php
  2.     do_action('flatsome_before_blog');
  3. ?>
  4. <?php if(!is_single() && flatsome_option('blog_featured') == 'top'){ get_template_part('template-parts/posts/featured-posts'); } ?>
  5. <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)
  1.     do_action'wp_before_load_template'$_template_file$load_once$args );
  2.     if ( $load_once ) {
  3.         require_once $_template_file;
  4.     } else {
  5.         require $_template_file;
  6.     }
  7.     /**
  8.      * Fires after a template file is loaded.
  9.      *
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)
  1.             break;
  2.         }
  3.     }
  4.     if ( $load && '' !== $located ) {
  5.         load_template$located$load_once$args );
  6.     }
  7.     return $located;
  8. }
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)
  1.      * @param string[] $templates Array of template files to search for, in order.
  2.      * @param array    $args      Additional arguments passed to the template.
  3.      */
  4.     do_action'get_template_part'$slug$name$templates$args );
  5.     if ( ! locate_template$templatestruefalse$args ) ) {
  6.         return false;
  7.     }
  8. }
  9. /**
get_template_part('template-parts/posts/layout', 'right-sidebar') in /var/www/wordpress/wp-content/themes/flatsome/index.php (line 13)
  1. get_header();
  2. ?>
  3. <div id="content" class="blog-wrapper blog-archive page-wrapper">
  4.         <?php get_template_part'template-parts/posts/layout'get_theme_mod('blog_layout','right-sidebar') ); ?>
  5. </div>
  6. <?php get_footer(); ?>
include('/var/www/wordpress/wp-content/themes/flatsome/index.php') in /var/www/wordpress/wp-includes/template-loader.php (line 106)
  1.      *
  2.      * @param string $template The path of the template to include.
  3.      */
  4.     $template apply_filters'template_include'$template );
  5.     if ( $template ) {
  6.         include $template;
  7.     } elseif ( current_user_can'switch_themes' ) ) {
  8.         $theme wp_get_theme();
  9.         if ( $theme->errors() ) {
  10.             wp_die$theme->errors() );
  11.         }
require_once('/var/www/wordpress/wp-includes/template-loader.php') in /var/www/wordpress/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/wordpress/wp-blog-header.php') in /var/www/wordpress/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 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)