Whoops \ Exception \ ErrorException (E_NOTICE)
Undefined offset: 0 Whoops\Exception\ErrorException thrown with message "Undefined offset: 0" Stacktrace: #7 Whoops\Exception\ErrorException in /sites/www.veracross.com/files/web/app/themes/veracross/parts/post/single/hero.php:10 #6 Whoops\Run:handleError in /sites/www.veracross.com/files/web/app/themes/veracross/parts/post/single/hero.php:10 #5 include in /sites/www.veracross.com/files/web/app/themes/veracross/core/includes/class-theme-template-engine.php:121 #4 Theme_Template_Engine:render in /sites/www.veracross.com/files/web/app/themes/veracross/core/includes/templating.php:14 #3 get_theme_part in /sites/www.veracross.com/files/web/app/themes/veracross/single.php:12 #2 include in /sites/www.veracross.com/files/web/wp/wp-includes/template-loader.php:106 #1 require_once in /sites/www.veracross.com/files/web/wp/wp-blog-header.php:19 #0 require in /sites/www.veracross.com/files/web/index.php:5
Stack frames (8)
7
Whoops\Exception\ErrorException
/web/app/themes/veracross/parts/post/single/hero.php10
6
Whoops\Run handleError
/web/app/themes/veracross/parts/post/single/hero.php10
5
include
/web/app/themes/veracross/core/includes/class-theme-template-engine.php121
4
Theme_Template_Engine render
/web/app/themes/veracross/core/includes/templating.php14
3
get_theme_part
/web/app/themes/veracross/single.php12
2
include
/web/wp/wp-includes/template-loader.php106
1
require_once
/web/wp/wp-blog-header.php19
0
require
/web/index.php5
/sites/www.veracross.com/files/web/app/themes/veracross/parts/post/single/hero.php
<?php
/**
 * Single Post Hero
 *
 * @package WordPress
 * @subpackage veracross
 * @since veracross  1.0
 */
 
$category      = get_the_category()[0];
$category_name = $category->name;
$category_url  = get_category_link( $category->term_id );
$author_name   = get_the_author();
$author_url    = get_author_posts_url( get_the_author_meta( 'ID' ) );
$date          = get_the_date( 'F j, Y' );
?>
<section class="post-hero">
    <div class="container">
        <div class="post-hero__blog-link-wrapper">
            <a class="post-hero__blog-link" href="<?php echo get_post_type_archive_link( 'post' ); ?>"><?php _e( 'Blog', 'veracross' ); ?></a>
        </div>
 
        <div class="row">
            <div class="col-12 col-lg-8 offset-lg-2">
                <div class="post-hero__content">
                    <div class="post-hero__category-wrapper">
                        <a class="post-hero__category" href="<?php echo $category_url; ?>"><?php echo $category_name; ?></a>
                    </div>
 
                    <h1><?php the_title(); ?></h1>
 
                    <div class="post-hero__bottom-info">
                        <p class="post-hero__author"><?php _e( 'By', 'veracross' ); ?><a class="post-hero__author-link" href="<?php echo $author_url; ?>"><?php echo $author_name; ?></a></p>
                        <div class="post-hero__date"><?php echo $date; ?></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
 
/sites/www.veracross.com/files/web/app/themes/veracross/parts/post/single/hero.php
<?php
/**
 * Single Post Hero
 *
 * @package WordPress
 * @subpackage veracross
 * @since veracross  1.0
 */
 
$category      = get_the_category()[0];
$category_name = $category->name;
$category_url  = get_category_link( $category->term_id );
$author_name   = get_the_author();
$author_url    = get_author_posts_url( get_the_author_meta( 'ID' ) );
$date          = get_the_date( 'F j, Y' );
?>
<section class="post-hero">
    <div class="container">
        <div class="post-hero__blog-link-wrapper">
            <a class="post-hero__blog-link" href="<?php echo get_post_type_archive_link( 'post' ); ?>"><?php _e( 'Blog', 'veracross' ); ?></a>
        </div>
 
        <div class="row">
            <div class="col-12 col-lg-8 offset-lg-2">
                <div class="post-hero__content">
                    <div class="post-hero__category-wrapper">
                        <a class="post-hero__category" href="<?php echo $category_url; ?>"><?php echo $category_name; ?></a>
                    </div>
 
                    <h1><?php the_title(); ?></h1>
 
                    <div class="post-hero__bottom-info">
                        <p class="post-hero__author"><?php _e( 'By', 'veracross' ); ?><a class="post-hero__author-link" href="<?php echo $author_url; ?>"><?php echo $author_name; ?></a></p>
                        <div class="post-hero__date"><?php echo $date; ?></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
 
/sites/www.veracross.com/files/web/app/themes/veracross/core/includes/class-theme-template-engine.php
                $location
            ) );
        }

        return false;
    }

    /**
     * Render the template.
     * Template to render is relative to the templates location set when
     * creating the instance of this class.
     *
     * @param string $template Template to render.
     * @param array  $data     Data to pass to the template.
     * @param string $folder   Overrides the default location.
     */
    public function render( $template, $data = [], $folder = '' ) {
        $file = $this->resolve_file( $template, $folder );
        extract( $data );
        include $file;
    }

    /**
     * Alias for "render".
     *
     * @param string $template
     * @param array  $data
     */
    public function insert( $template, $data = [] ) {
        $this->render( $template, $data );
    }

    /**
     * Begin generating the layout/
     *
     * @param string $layout Template name containing a layout.
     * @param array  $data   Data to pass to the layout file.
     */
    public function start_layout( $layout, $data = [] ) {
        $this->layout_data = $data;
/sites/www.veracross.com/files/web/app/themes/veracross/core/includes/templating.php
<?php

/**
 * Retrieve part of the template.
 * Uses template engine build into theme to grab the file (relative to "parts" directory),
 * and pass variables to this files local scope.
 *
 * @param string $part
 * @param array  $data
 * @param string $folder
 */
function get_theme_part( $part, $data = array(), $folder = 'parts' ) {
    $engine = Theme_Template_Engine::create( $folder );
    $engine->render( $part, $data );
}

/**
 * Begin generating a theme part layout.
 *
 * @param string $layout
 * @param array  $data
 * @param string $folder
 */
function start_layout( $layout, $data = [], $folder = 'parts' ) {
    $engine = Theme_Template_Engine::create( $folder );
    $engine->start_layout( $layout, $data );
}

/**
 * Begin outputting to the next layout part.
 *
 * @param string $folder
 */
function next_layout_part( $folder = 'parts' ) {
    $engine = Theme_Template_Engine::create( $folder );
    $engine->next_layout_part();
}

/**
 * Finalize (print) generated layout.
/sites/www.veracross.com/files/web/app/themes/veracross/single.php
<?php
/**
 * The single post page template.
 *
 * @package    WordPress
 * @subpackage veracross
 * @since      veracross 1.0
 */

get_header();
the_post();
get_theme_part( 'post/single/hero' );
?>
<main class="main-content">
<?php
    defaultContent();
    ContentBlock::display_theme_blocks();
?>
</main>
<?php
get_theme_part( 'post/single/summary' );
get_theme_part( 'post/single/related' );
get_footer();
 
/sites/www.veracross.com/files/web/wp/wp-includes/template-loader.php
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @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() );
        }
    }
    return;
}
 
/sites/www.veracross.com/files/web/wp/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
/sites/www.veracross.com/files/web/index.php
<?php

/** WordPress view bootstrapper */
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx/1.18.0
REQUEST_URI /blog/gallery/example-gallery/
SPINUPWP_CACHE_KEY_SALT www.veracross.com
SPINUPWP_LOG_PATH /sites/www.veracross.com/logs/debug.log
SPINUPWP_SITE 1
USER veracross_prod
HOME /sites/www.veracross.com
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.veracross.com
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_STATUS 200
SERVER_NAME www.veracross.com
SERVER_PORT 443
SERVER_ADDR 172.30.1.36
REMOTE_USER
REMOTE_PORT 50164
REMOTE_ADDR 18.206.177.17
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /sites/www.veracross.com/files/web
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /sites/www.veracross.com/files/web/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1618705675.7193
REQUEST_TIME 1618705675
DB_NAME veracross_prod
DB_USER veracross_prod
DB_PASS AtsCiW7iaNMzVS8RGkKmMa7l
DB_HOST 127.0.0.1
WP_ENV development
APP_URL https://www.veracross.com
AUTH_KEY zUm8Sk_H#(1LY,W<+2PJrz7_bcS{U}|bll`I0v</03PlewCWg%$cp-xz*bNJjfZi
SECURE_AUTH_KEY %3453[24}e?UI`GkZX)AZ=}$^ZEQnq1JPj(517j.s).t^]#[q;E|S4O-<$+<z17g
LOGGED_IN_KEY rS|u|fh8W]fKxn8Q4X3Prpvxe!3JRa&|pe6DAu2}|uKVR(<.CKLLTys/Shmq(M!X
NONCE_KEY 8iy588hfY#PFx#UBhin;DUtfFb>*@uX[,[#bTP2fu:vhbK##xFm,GAUcp6XB)OKx
AUTH_SALT X$@)CLg7tvEA$MzGlZ8p#(j,4NUx;X#GABuR^2Ke[0_iyM3M)xLQi#b93B0I*}0{
SECURE_AUTH_SALT Xy{$i]9c07-<@`1aoJa2eyq<#kOE4BWLa9Z6Ids}xy{KTGCBDTd`{uZU9w%CPwL6
LOGGED_IN_SALT zI{N8Vqn#.$#iX7*.x>LEQE[|8Yyl|TML>:FlVi=uI_;7@ce?g]POB#[qSHOtlr$
NONCE_SALT z0.GN2#3OTo4Gt%;pSgpErcymAXTo#ykDZvld22.xMo.>CWh:D?:V62,A$Gz*/R1
Key Value
DB_NAME veracross_prod
DB_USER veracross_prod
DB_PASS AtsCiW7iaNMzVS8RGkKmMa7l
DB_HOST 127.0.0.1
WP_ENV development
APP_URL https://www.veracross.com
AUTH_KEY zUm8Sk_H#(1LY,W<+2PJrz7_bcS{U}|bll`I0v</03PlewCWg%$cp-xz*bNJjfZi
SECURE_AUTH_KEY %3453[24}e?UI`GkZX)AZ=}$^ZEQnq1JPj(517j.s).t^]#[q;E|S4O-<$+<z17g
LOGGED_IN_KEY rS|u|fh8W]fKxn8Q4X3Prpvxe!3JRa&|pe6DAu2}|uKVR(<.CKLLTys/Shmq(M!X
NONCE_KEY 8iy588hfY#PFx#UBhin;DUtfFb>*@uX[,[#bTP2fu:vhbK##xFm,GAUcp6XB)OKx
AUTH_SALT X$@)CLg7tvEA$MzGlZ8p#(j,4NUx;X#GABuR^2Ke[0_iyM3M)xLQi#b93B0I*}0{
SECURE_AUTH_SALT Xy{$i]9c07-<@`1aoJa2eyq<#kOE4BWLa9Z6Ids}xy{KTGCBDTd`{uZU9w%CPwL6
LOGGED_IN_SALT zI{N8Vqn#.$#iX7*.x>LEQE[|8Yyl|TML>:FlVi=uI_;7@ce?g]POB#[qSHOtlr$
NONCE_SALT z0.GN2#3OTo4Gt%;pSgpErcymAXTo#ykDZvld22.xMo.>CWh:D?:V62,A$Gz*/R1
0. Whoops\Handler\PrettyPageHandler