Whoops \ Exception \ ErrorException (E_WARNING)
Trying to access array offset on null Whoops\Exception\ErrorException thrown with message "Trying to access array offset on null" Stacktrace: #4 Whoops\Exception\ErrorException in /var/www/dozorme/wp-content/themes/wat-wp-theme/template-home.php:12 #3 Whoops\Run:handleError in /var/www/dozorme/wp-content/themes/wat-wp-theme/template-home.php:12 #2 include in /var/www/dozorme/wp-includes/template-loader.php:106 #1 require_once in /var/www/dozorme/wp-blog-header.php:19 #0 require in /var/www/dozorme/index.php:17
Stack frames (5)
4
Whoops\Exception\ErrorException
/var/www/dozorme/wp-content/themes/wat-wp-theme/template-home.php12
3
Whoops\Run handleError
/var/www/dozorme/wp-content/themes/wat-wp-theme/template-home.php12
2
include
/var/www/dozorme/wp-includes/template-loader.php106
1
require_once
/var/www/dozorme/wp-blog-header.php19
0
require
/var/www/dozorme/index.php17
/var/www/dozorme/wp-content/themes/wat-wp-theme/template-home.php
<?php /* Template Name: Accueil */ ?>
 
<?php get_header(); ?>
 
<div class="container_home">
    <div class="head">
 
        <?php
 
            $entete = get_field('en-tete');
 
            $image = $entete['image'];
            $image_mobile = $entete['image_mobile'];
            $titre = $entete['titre'];
            $texte = $entete['texte'];
            $produit = $entete['produit'];
 
            if ($image !== null) {
                $image_url = $image['sizes']['xlarge'];
                ?>
                <div class="image desktop">
                    <img src="<?php echo $image_url; ?>" alt="">
                </div>
                <?php
            }
 
            if ($image_mobile !== null) {
                $image_mobile_url = $image_mobile['sizes']['xlarge'];
                ?>
                <div class="image mobile">
                    <img src="<?php echo $image_mobile_url; ?>" alt="">
                </div>
                <?php
            }
        ?>
 
        <div class="texte_container">
            <div class="texte">
                <?php
 
Arguments
  1. "Trying to access array offset on null"
    
/var/www/dozorme/wp-content/themes/wat-wp-theme/template-home.php
<?php /* Template Name: Accueil */ ?>
 
<?php get_header(); ?>
 
<div class="container_home">
    <div class="head">
 
        <?php
 
            $entete = get_field('en-tete');
 
            $image = $entete['image'];
            $image_mobile = $entete['image_mobile'];
            $titre = $entete['titre'];
            $texte = $entete['texte'];
            $produit = $entete['produit'];
 
            if ($image !== null) {
                $image_url = $image['sizes']['xlarge'];
                ?>
                <div class="image desktop">
                    <img src="<?php echo $image_url; ?>" alt="">
                </div>
                <?php
            }
 
            if ($image_mobile !== null) {
                $image_mobile_url = $image_mobile['sizes']['xlarge'];
                ?>
                <div class="image mobile">
                    <img src="<?php echo $image_mobile_url; ?>" alt="">
                </div>
                <?php
            }
        ?>
 
        <div class="texte_container">
            <div class="texte">
                <?php
 
/var/www/dozorme/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;
}
 
Arguments
  1. "/var/www/dozorme/wp-content/themes/wat-wp-theme/template-home.php"
    
/var/www/dozorme/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';
 
}
 
Arguments
  1. "/var/www/dozorme/wp-includes/template-loader.php"
    
/var/www/dozorme/index.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';
 
Arguments
  1. "/var/www/dozorme/wp-blog-header.php"
    

Environment & details:

empty
Key Value
query_vars
array:10 [
  "p" => 49
  "page_id" => 49
  "fields" => "all"
  "cache_results" => true
  "update_post_term_cache" => true
  "lazy_load_term_meta" => true
  "update_post_meta_cache" => true
  "posts_per_page" => 30
  "comments_per_page" => "50"
  "order" => "DESC"
]
tax_query
WP_Tax_Query {#8564}
meta_query
WP_Meta_Query {#8574}
queried_object
WP_Post {#8580}
queried_object_id
49
request
"""
SELECT   wDOz_posts.*\n
\t\t\t\t\t FROM wDOz_posts  JOIN wDOz_icl_translations wpml_translations\n
\t\t\t\t\t\t\tON wDOz_posts.ID = wpml_translations.element_id\n
\t\t\t\t\t\t\t\tAND wpml_translations.element_type = CONCAT('post_', wDOz_posts.post_type) \n
\t\t\t\t\t WHERE 1=1  AND wDOz_posts.ID = 49 AND wDOz_posts.post_type = 'page' AND ( ( ( wpml_translations.language_code = 'en' OR (\n
\t\t\t\t\twpml_translations.language_code = 'fr'\n
\t\t\t\t\tAND wDOz_posts.post_type IN ( 'product' )\n
\t\t\t\t\tAND ( ( \n
\t\t\t( SELECT COUNT(element_id)\n
\t\t\t  FROM wDOz_icl_translations\n
\t\t\t  WHERE trid = wpml_translations.trid\n
\t\t\t  AND language_code = 'en'\n
\t\t\t) = 0\n
\t\t\t ) OR ( \n
\t\t\t( SELECT COUNT(element_id)\n
\t\t\t\tFROM wDOz_icl_translations t2\n
\t\t\t\tJOIN wDOz_posts p ON p.id = t2.element_id\n
\t\t\t\tWHERE t2.trid = wpml_translations.trid\n
\t\t\t\tAND t2.language_code = 'en'\n
                AND (\n
                    p.post_status = 'publish' OR p.post_status = 'private' OR \n
                    ( p.post_type='attachment' AND p.post_status = 'inherit' )\n
                )\n
\t\t\t) = 0 ) ) \n
\t\t\t\t) ) AND wDOz_posts.post_type  IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','product','product_variation' )  ) OR wDOz_posts.post_type  NOT  IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','product','product_variation' )  )\n
\t\t\t\t\t \n
\t\t\t\t\t ORDER BY wDOz_posts.post_date DESC\n
\t\t\t\t\t 
"""
post_count
1
current_post
-1
before_loop
true
current_comment
-1
found_posts
1
is_page
true
is_singular
true
Key Value
ID
49
post_author
"1"
post_date
"2023-12-07 11:43:02"
post_date_gmt
"2023-12-07 10:43:02"
post_content
""
post_title
"Page d'accueil"
post_excerpt
""
post_status
"publish"
comment_status
"closed"
ping_status
"closed"
post_password
""
post_name
"page-daccueil"
to_ping
""
pinged
""
post_modified
"2023-12-07 11:46:20"
post_modified_gmt
"2023-12-07 10:46:20"
post_content_filtered
""
post_parent
0
guid
"https://dozorme.ac-dev.net/page-daccueil"
menu_order
0
post_type
"page"
post_mime_type
""
comment_count
"0"
filter
"raw"
empty
empty
empty
Key Value
PHPSESSID
"03kl03n6fijddlp7vjke37ijtn"
wp-wpml_current_language
"en"
Key Value
ac_flash
[]
Key Value
SERVER_SOFTWARE
"nginx/1.18.0"
REQUEST_URI
"/en"
USER
"www-data"
HOME
"/var/www"
HTTP_COOKIE
"PHPSESSID=03kl03n6fijddlp7vjke37ijtn"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"dozorme.ac-dev.net"
PHP_VALUE
"""
error_log=/var/log/nginx/dozorme_php_errors.log\n
    log_errors=on
"""
SCRIPT_FILENAME
"/var/www/dozorme/index.php"
REDIRECT_STATUS
"200"
SERVER_NAME
"dozorme.ac-dev.net"
SERVER_PORT
"443"
SERVER_ADDR
"51.255.64.83"
REMOTE_USER
""
REMOTE_PORT
"23401"
REMOTE_ADDR
"216.73.216.190"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
REQUEST_SCHEME
"https"
SERVER_PROTOCOL
"HTTP/2.0"
DOCUMENT_ROOT
"/var/www/dozorme"
DOCUMENT_URI
"/index.php"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1768848175.0404
REQUEST_TIME
1768848175
empty
0. Whoops\Handler\PrettyPageHandler
1. AC\Whoops\AjaxHandler
2. AC\Whoops\APIHandler