Whoops \ Exception \ ErrorException (E_WARNING)
Undefined array key 0 Whoops\Exception\ErrorException thrown with message "Undefined array key 0" Stacktrace: #4 Whoops\Exception\ErrorException in /var/www/vhosts/hifrance.org/httpdocs/wp-content/themes/g5_hydrogen/archive-week-end.php:19 #3 Gantry\Component\Whoops\SystemFacade:handleError in /var/www/vhosts/hifrance.org/httpdocs/wp-content/themes/g5_hydrogen/archive-week-end.php:19 #2 include in /var/www/vhosts/hifrance.org/httpdocs/wp-includes/template-loader.php:106 #1 require_once in /var/www/vhosts/hifrance.org/httpdocs/wp-blog-header.php:19 #0 require in /var/www/vhosts/hifrance.org/httpdocs/index.php:17
Stack frames (5)
4
Whoops\Exception\ErrorException
/var/www/vhosts/hifrance.org/httpdocs/wp-content/themes/g5_hydrogen/archive-week-end.php19
3
Gantry\Component\Whoops\SystemFacade handleError
/var/www/vhosts/hifrance.org/httpdocs/wp-content/themes/g5_hydrogen/archive-week-end.php19
2
include
/var/www/vhosts/hifrance.org/httpdocs/wp-includes/template-loader.php106
1
require_once
/var/www/vhosts/hifrance.org/httpdocs/wp-blog-header.php19
0
require
/var/www/vhosts/hifrance.org/httpdocs/index.php17
<?php
get_header();
$bc = get_post(3392);
echo do_shortcode($bc->post_content);
if(is_archive()) {
    $args = array(
        'post_type' => 'template_archive',
        'posts_per_page' => -1,
        );
    $tpls = get_posts($args);
    function getActiveMeta($tpl) {
        $archive = get_queried_object()->name;
        $value = get_post_meta($tpl->ID, '_tpl_archive_meta_key', true);
        if($value == $archive) {
            return true;
        }
    }
    $arrfiltered = array_filter($tpls, 'getActiveMeta');
    $firstKey = array_keys($arrfiltered)[0];
    $post = $arrfiltered[$firstKey];
    echo do_shortcode($post->post_content);
}
get_footer();
?>
<?php
get_header();
$bc = get_post(3392);
echo do_shortcode($bc->post_content);
if(is_archive()) {
    $args = array(
        'post_type' => 'template_archive',
        'posts_per_page' => -1,
        );
    $tpls = get_posts($args);
    function getActiveMeta($tpl) {
        $archive = get_queried_object()->name;
        $value = get_post_meta($tpl->ID, '_tpl_archive_meta_key', true);
        if($value == $archive) {
            return true;
        }
    }
    $arrfiltered = array_filter($tpls, 'getActiveMeta');
    $firstKey = array_keys($arrfiltered)[0];
    $post = $arrfiltered[$firstKey];
    echo do_shortcode($post->post_content);
}
get_footer();
?>
            }
 
            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;
}
 
<?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';
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

Key Value
post_type week-end
empty
empty
Key Value
wp-wpml_current_language fr
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /tag/offre-speciale/?post_type=week-end
USER hifrance
HOME /var/www/vhosts/hifrance.org
SCRIPT_NAME /index.php
QUERY_STRING post_type=week-end
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /tag/offre-speciale/
REDIRECT_QUERY_STRING post_type=week-end
REMOTE_PORT 52270
SCRIPT_FILENAME /var/www/vhosts/hifrance.org/httpdocs/index.php
SERVER_ADMIN root@localhost
CONTEXT_DOCUMENT_ROOT /var/www/vhosts/hifrance.org/httpdocs
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /var/www/vhosts/hifrance.org/httpdocs
REMOTE_ADDR 3.131.110.169
SERVER_PORT 443
SERVER_ADDR 51.38.58.125
SERVER_NAME www.hifrance.org
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_X_ACCEL_INTERNAL /internal-nginx-static-location
HTTP_X_REAL_IP 3.131.110.169
HTTP_HOST www.hifrance.org
proxy-nokeepalive 1
HTTPS on
HTTP_AUTHORIZATION
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0
PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
SCRIPT_URI https://www.hifrance.org/tag/offre-speciale/
SCRIPT_URL /tag/offre-speciale/
UNIQUE_ID ZisXcWAvsguwV5n-QCuvuAAAAJc
REDIRECT_STATUS 200
REDIRECT_HTTPS on
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0
REDIRECT_PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
REDIRECT_SCRIPT_URI https://www.hifrance.org/tag/offre-speciale/
REDIRECT_SCRIPT_URL /tag/offre-speciale/
REDIRECT_UNIQUE_ID ZisXcWAvsguwV5n-QCuvuAAAAJc
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1714100081.2479
REQUEST_TIME 1714100081
empty
0. Whoops\Handler\PrettyPageHandler