Whoops \ Exception \ ErrorException (E_NOTICE)
Undefined offset: 0 Whoops\Exception\ErrorException thrown with message "Undefined offset: 0" Stacktrace: #5 Whoops\Exception\ErrorException in /home/krushby/www/wp-content/themes/ac-wp-theme/app/controllers/ReworkController.php:298 #4 Whoops\Run:handleError in /home/krushby/www/wp-content/themes/ac-wp-theme/app/controllers/ReworkController.php:298 #3 ReworkController:updateTermMetiers in /home/krushby/www/wp-content/themes/ac-wp-theme/template-reworkprofil.php:13 #2 include in /home/krushby/www/wp-includes/template-loader.php:106 #1 require_once in /home/krushby/www/wp-blog-header.php:19 #0 require in /home/krushby/www/index.php:17
Stack frames (6)
5
Whoops
\
Exception
\
ErrorException
/
home
/
krushby
/
www
/
wp-content
/
themes
/
ac-wp-theme
/
app
/
controllers
/
ReworkController.php
298
4
Whoops
\
Run
handleError
/
home
/
krushby
/
www
/
wp-content
/
themes
/
ac-wp-theme
/
app
/
controllers
/
ReworkController.php
298
3
ReworkController
updateTermMetiers
/
home
/
krushby
/
www
/
wp-content
/
themes
/
ac-wp-theme
/
template-reworkprofil.php
13
2
include
/
home
/
krushby
/
www
/
wp-includes
/
template-loader.php
106
1
require_once
/
home
/
krushby
/
www
/
wp-blog-header.php
19
0
require
/
home
/
krushby
/
www
/
index.php
17
/
home
/
krushby
/
www
/
wp-content
/
themes
/
ac-wp-theme
/
app
/
controllers
/
ReworkController.php
        public function updateTermMetiers()
        {
 
            $offres = $this->getAllOffres();
            foreach ($offres as $keyO => $offres) {
                $emailOffre = get_field('email', $offres->ID);
                $argsFind = array(
                    'post_type' => 'profils_physiques',
                    'posts_per_page' => -1,
                    'post_status'  => 'publish',
                    'meta_query' => array(
                        array(
                           'key'       => 'email',
                           'value'     => $emailOffre,
                           'compare'   => '='
                        )
                    ),
                );
                $postFound = get_posts($argsFind);
                $isolatePost = $postFound[0];
                $isolatePostID = $isolatePost->ID;
 
                $regionOffre = get_the_terms( $offres->ID, 'tax_metier');
                $isolateRegion = $regionOffre[0];
                dump($isolateRegion);
 
                $regionForProfil = get_term_by('name', $isolateRegion->name, 'profil_metier');
                dump($regionForProfil);
                wp_set_post_terms($isolatePostID, array($regionForProfil->term_id), 'profil_metier');
                // update_post_meta($offres->ID, 'lier_avec_le_profil', $isolatePostID);
            }
 
 
        }
 
    }
 
    // controller('ExampleController', ReworkController::class);
 
Arguments
  1. "Undefined offset: 0"
    
/
home
/
krushby
/
www
/
wp-content
/
themes
/
ac-wp-theme
/
app
/
controllers
/
ReworkController.php
        public function updateTermMetiers()
        {
 
            $offres = $this->getAllOffres();
            foreach ($offres as $keyO => $offres) {
                $emailOffre = get_field('email', $offres->ID);
                $argsFind = array(
                    'post_type' => 'profils_physiques',
                    'posts_per_page' => -1,
                    'post_status'  => 'publish',
                    'meta_query' => array(
                        array(
                           'key'       => 'email',
                           'value'     => $emailOffre,
                           'compare'   => '='
                        )
                    ),
                );
                $postFound = get_posts($argsFind);
                $isolatePost = $postFound[0];
                $isolatePostID = $isolatePost->ID;
 
                $regionOffre = get_the_terms( $offres->ID, 'tax_metier');
                $isolateRegion = $regionOffre[0];
                dump($isolateRegion);
 
                $regionForProfil = get_term_by('name', $isolateRegion->name, 'profil_metier');
                dump($regionForProfil);
                wp_set_post_terms($isolatePostID, array($regionForProfil->term_id), 'profil_metier');
                // update_post_meta($offres->ID, 'lier_avec_le_profil', $isolatePostID);
            }
 
 
        }
 
    }
 
    // controller('ExampleController', ReworkController::class);
 
Arguments
  1. 8
    
  2. "Undefined offset: 0"
    
  3. "/home/krushby/www/wp-content/themes/ac-wp-theme/app/controllers/ReworkController.php"
    
  4. 298
    
  5. array:10 [
      "offres" => WP_Post {#2223}
      "keyO" => 4
      "emailOffre" => ""
      "argsFind" => array:4 [
        "post_type" => "profils_physiques"
        "posts_per_page" => -1
        "post_status" => "publish"
        "meta_query" => array:1 [
          0 => array:3 [
            "key" => "email"
            "value" => ""
            "compare" => "="
          ]
        ]
      ]
      "postFound" => []
      "isolatePost" => WP_Post {#3960}
      "isolatePostID" => 1170
      "regionOffre" => array:1 [
        0 => WP_Term {#3982}
      ]
      "isolateRegion" => WP_Term {#3982}
      "regionForProfil" => WP_Term {#3931}
    ]
    
/
home
/
krushby
/
www
/
wp-content
/
themes
/
ac-wp-theme
/
template-reworkprofil.php
<?php /* Template Name: Reworkprofil */ ?>
 
<?php
    get_header();
    $RW = new ReworkController();
    // $allOffres = $RW->getAllOffres();
    // $createProfils = $RW->createProfilUnique();
    // $addAggregatedContent= $RW->addAggregatedContent();
    // $linkProfilsToOffers= $RW->linkProfilsToOffers();
    // $insertTermRegion= $RW->insertTermRegion();
    // $insertTermMetiers= $RW->insertTermMetiers();
    // $updateTermRegion= $RW->updateTermRegion();
    $updateTermMetiers= $RW->updateTermMetiers();
 
?>
 
<div class="container_rework">
 
</div>
 
<?php get_footer(); ?>
 
/
home
/
krushby
/
www
/
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. "/home/krushby/www/wp-content/themes/ac-wp-theme/template-reworkprofil.php"
    
/
home
/
krushby
/
www
/
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. "/home/krushby/www/wp-includes/template-loader.php"
    
/
home
/
krushby
/
www
/
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. "/home/krushby/www/wp-blog-header.php"
    

Environment & details:

Key Value
query_vars
array:2 [
  "page" => ""
  "pagename" => "rework-profils"
]
query_string
"pagename=rework-profils"
request
"rework-profils"
matched_rule
"(.?.+?)(?:/([0-9]+))?/?$"
matched_query
"pagename=rework-profils&page="
did_permalink
true
Key Value
query
array:2 [
  "page" => ""
  "pagename" => "rework-profils"
]
query_vars
array:9 [
  "pagename" => "rework-profils"
  "name" => "rework-profils"
  "cache_results" => true
  "update_post_term_cache" => true
  "lazy_load_term_meta" => true
  "update_post_meta_cache" => true
  "posts_per_page" => 10
  "comments_per_page" => "50"
  "order" => "DESC"
]
meta_query
WP_Meta_Query {#2157}
queried_object
WP_Post {#2154}
queried_object_id
935
request
"""
SELECT   wpKA_posts.*\n
\t\t\t\t\t FROM wpKA_posts \n
\t\t\t\t\t WHERE 1=1  AND (wpKA_posts.ID = '935') AND wpKA_posts.post_type = 'page'\n
\t\t\t\t\t \n
\t\t\t\t\t ORDER BY wpKA_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
935
post_author
"1"
post_date
"2023-03-20 12:02:15"
post_date_gmt
"2023-03-20 11:02:15"
post_content
""
post_title
"REWORK PROFILS"
post_excerpt
""
post_status
"publish"
comment_status
"closed"
ping_status
"closed"
post_password
""
post_name
"rework-profils"
to_ping
""
pinged
""
post_modified
"2023-03-20 12:02:15"
post_modified_gmt
"2023-03-20 11:02:15"
post_content_filtered
""
post_parent
0
guid
"https://krush-by-krysaudition.fr/?page_id=935"
menu_order
0
post_type
"page"
post_mime_type
""
comment_count
"0"
filter
"raw"
empty
empty
empty
empty
Key Value
ac_flash
[]
Key Value
SERVER_SOFTWARE
"Apache"
REQUEST_URI
"/rework-profils/"
USER
"krushby"
SCRIPT_NAME
"/index.php"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.1"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/rework-profils/"
REMOTE_PORT
"35392"
SCRIPT_FILENAME
"/home/krushby/www/index.php"
SERVER_ADMIN
"postmaster@krush-by-krysaudition.fr"
DOCUMENT_ROOT
"/home/krushby/www"
REMOTE_ADDR
"13.58.135.0"
SERVER_PORT
"443"
SERVER_ADDR
"10.31.41.230"
SERVER_NAME
"krush-by-krysaudition.fr"
SERVER_SIGNATURE
""
HTTP_REMOTE_IP
"13.58.135.0"
HTTP_X_VARNISH
"840187639"
HTTP_ACCEPT_ENCODING
"br, gzip"
HTTP_X_AE
"br"
HTTP_X_SCHEME
"https"
HTTP_X_CDN_REQUEST_ID
"798866813"
HTTP_X_CDN_ANY_IP
"46.105.204.31"
HTTP_X_REMOTE_PORT
"23779"
HTTP_REMOTE_PORT
"23779"
HTTP_X_REMOTE_IP
"13.58.135.0"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT
"*/*"
HTTP_SCHEME
"https"
HTTP_X_OVHREQUEST_ID
"b2a5988ed139e245c2c607dea859bb6b"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_FORWARDED_FOR
"13.58.135.0"
HTTP_X_PREDICTOR
"1"
HTTP_HOST
"krush-by-krysaudition.fr"
ENVIRONMENT
"production"
CFG_CLUSTER
"cluster031"
HTTP_AUTHORIZATION
""
HTTPS
"on"
SCRIPT_URI
"https://krush-by-krysaudition.fr:443/rework-profils/"
SCRIPT_URL
"/rework-profils/"
GEOIP_LONGITUDE
"-83.006104"
GEOIP_LATITUDE
"39.962502"
GEOIP_AREA_CODE
"614"
GEOIP_DMA_CODE
"535"
GEOIP_CITY
"Columbus"
GEOIP_REGION
"OH"
GEOIP_COUNTRY_NAME
"United States"
GEOIP_COUNTRY_CODE
"US"
UNIQUE_ID
"ZqRgQBGRCb6XX1E1DIjYZgAAAEY"
REDIRECT_STATUS
"200"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1722048576.9546
REQUEST_TIME
1722048576
argv
[]
argc
0
Key Value
USER
"krushby"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/rework-profils/"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.1"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/rework-profils/"
REMOTE_PORT
"35392"
SCRIPT_FILENAME
"/home/krushby/www/index.php"
SERVER_ADMIN
"postmaster@krush-by-krysaudition.fr"
DOCUMENT_ROOT
"/home/krushby/www"
REMOTE_ADDR
"13.58.135.0"
SERVER_PORT
"443"
SERVER_ADDR
"10.31.41.230"
SERVER_NAME
"krush-by-krysaudition.fr"
SERVER_SOFTWARE
"Apache"
SERVER_SIGNATURE
""
HTTP_REMOTE_IP
"13.58.135.0"
HTTP_X_VARNISH
"840187639"
HTTP_ACCEPT_ENCODING
"br, gzip"
HTTP_X_AE
"br"
HTTP_X_SCHEME
"https"
HTTP_X_CDN_REQUEST_ID
"798866813"
HTTP_X_CDN_ANY_IP
"46.105.204.31"
HTTP_X_REMOTE_PORT
"23779"
HTTP_REMOTE_PORT
"23779"
HTTP_X_REMOTE_IP
"13.58.135.0"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT
"*/*"
HTTP_SCHEME
"https"
HTTP_X_OVHREQUEST_ID
"b2a5988ed139e245c2c607dea859bb6b"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_FORWARDED_FOR
"13.58.135.0"
HTTP_X_PREDICTOR
"1"
HTTP_HOST
"krush-by-krysaudition.fr"
ENVIRONMENT
"production"
CFG_CLUSTER
"cluster031"
HTTP_AUTHORIZATION
""
HTTPS
"on"
SCRIPT_URI
"https://krush-by-krysaudition.fr:443/rework-profils/"
SCRIPT_URL
"/rework-profils/"
GEOIP_LONGITUDE
"-83.006104"
GEOIP_LATITUDE
"39.962502"
GEOIP_AREA_CODE
"614"
GEOIP_DMA_CODE
"535"
GEOIP_CITY
"Columbus"
GEOIP_REGION
"OH"
GEOIP_COUNTRY_NAME
"United States"
GEOIP_COUNTRY_CODE
"US"
UNIQUE_ID
"ZqRgQBGRCb6XX1E1DIjYZgAAAEY"
REDIRECT_STATUS
"200"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1722048576.9546
REQUEST_TIME
1722048576
argv
[]
argc
0
0. Whoops\Handler\PrettyPageHandler
1. AC\Whoops\AjaxHandler
2. AC\Whoops\APIHandler