Whoops \ Exception \ ErrorException (E_WARNING)
Undefined array key 0 Whoops\Exception\ErrorException thrown with message "Undefined array key 0" Stacktrace: #8 Whoops\Exception\ErrorException in /home/forge/deploy/faubourg.ayctor.dev/releases/42/app/Controllers/BuildingController.php:21 #7 Bugsnag\Handler:errorHandler in /home/forge/deploy/faubourg.ayctor.dev/releases/42/app/Controllers/BuildingController.php:21 #6 Ayctor\Controllers\BuildingController:show in /home/forge/deploy/faubourg.ayctor.dev/shared/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php:20 #5 call_user_func in /home/forge/deploy/faubourg.ayctor.dev/shared/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php:20 #4 WpCore\Bootstrap\Router:call_function in /home/forge/deploy/faubourg.ayctor.dev/shared/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php:74 #3 WpCore\Bootstrap\Router:is_singular in /home/forge/deploy/faubourg.ayctor.dev/releases/32/index.php:11 #2 include in /home/forge/faubourg.ayctor.dev/wp-includes/template-loader.php:106 #1 require_once in /home/forge/faubourg.ayctor.dev/wp-blog-header.php:19 #0 require in /home/forge/faubourg.ayctor.dev/index.php:17
Stack frames (9)
8
Whoops\Exception\ErrorException
/home/forge/deploy/faubourg.ayctor.dev/releases/42/app/Controllers/BuildingController.php21
7
Bugsnag\Handler errorHandler
/home/forge/deploy/faubourg.ayctor.dev/releases/42/app/Controllers/BuildingController.php21
6
Ayctor\Controllers\BuildingController show
/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php20
5
call_user_func
/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php20
4
WpCore\Bootstrap\Router call_function
/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php74
3
WpCore\Bootstrap\Router is_singular
/home/forge/deploy/faubourg.ayctor.dev/releases/32/index.php11
2
include
/home/forge/faubourg.ayctor.dev/wp-includes/template-loader.php106
1
require_once
/home/forge/faubourg.ayctor.dev/wp-blog-header.php19
0
require
/home/forge/faubourg.ayctor.dev/index.php17
/home/forge/deploy/faubourg.ayctor.dev/releases/42/app/Controllers/BuildingController.php
 
namespace Ayctor\Controllers;
 
use Ayctor\Utils\Helper;
use Ayctor\Utils\Search;
use WpCore\Controllers\Controller;
 
class BuildingController extends Controller
{
    /**
     * View for amenageur.php.
     *
     * @return string
     */
    public function show()
    {
        $layouts = get_field('building_blocks');
 
        $typologies = Helper::getTypologies(get_the_ID());
        $typology = $typologies[0];
        if (count($typologies) > 1) {
            $color = config('typologies.names.Multi Activité.color');
        } else {
            $color = config('typologies.names.' . $typology . '.color');
        }
 
        if(!$layouts) {
            $layouts = [];
        }
 
        foreach ($layouts as $key => $layout) {
            if ($layout['acf_fc_layout'] == 'layout_related') {
                $search = new Search([
                    'post_type' => 'building',
                    'typologies' => implode(',', $typologies),
                ], 0, 3);
                $recommended = $search->results();
                $layout['related_projects'] = [];
                foreach ($recommended as $project) {
                    $layout['related_projects'][] = $project['_source']['post_id'];
Arguments
  1. "Undefined array key 0"
    
/home/forge/deploy/faubourg.ayctor.dev/releases/42/app/Controllers/BuildingController.php
 
namespace Ayctor\Controllers;
 
use Ayctor\Utils\Helper;
use Ayctor\Utils\Search;
use WpCore\Controllers\Controller;
 
class BuildingController extends Controller
{
    /**
     * View for amenageur.php.
     *
     * @return string
     */
    public function show()
    {
        $layouts = get_field('building_blocks');
 
        $typologies = Helper::getTypologies(get_the_ID());
        $typology = $typologies[0];
        if (count($typologies) > 1) {
            $color = config('typologies.names.Multi Activité.color');
        } else {
            $color = config('typologies.names.' . $typology . '.color');
        }
 
        if(!$layouts) {
            $layouts = [];
        }
 
        foreach ($layouts as $key => $layout) {
            if ($layout['acf_fc_layout'] == 'layout_related') {
                $search = new Search([
                    'post_type' => 'building',
                    'typologies' => implode(',', $typologies),
                ], 0, 3);
                $recommended = $search->results();
                $layout['related_projects'] = [];
                foreach ($recommended as $project) {
                    $layout['related_projects'][] = $project['_source']['post_id'];
/home/forge/deploy/faubourg.ayctor.dev/shared/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php
<?php
 
namespace WpCore\Bootstrap;
use Illuminate\Support\Str;
 
/**
 * Router class for WP Core boilerplate.
 * @package WpCore\Bootstrap
 */
 
class Router
{
    /**
     * Creates a list populated by the callback's controller and method.
     * Calls the function in the list passed as a parameter.
     * @param $method
     */
    protected static function call_function($callback) {
        list($controller, $method) = Str::parseCallback($callback);
        call_user_func([new $controller, $method]);
        exit();
    }
 
    /**
     * Checks if the query has no results (404).
     * @param $method
     */
    public static function is_404($method) {
        if (function_exists("is_404") && is_404()) {
            self::call_function($method);
        }
    }
 
    /**
     * Checks if you are on the BLOG homepage, if you set a static page as the front page this conditional tag
     * will return true only if you are on the page you set as the "Posts page".
     * @param $method
     */
    public static function is_home($method) {
        if (function_exists("is_home") && is_home()) {
/home/forge/deploy/faubourg.ayctor.dev/shared/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php
<?php
 
namespace WpCore\Bootstrap;
use Illuminate\Support\Str;
 
/**
 * Router class for WP Core boilerplate.
 * @package WpCore\Bootstrap
 */
 
class Router
{
    /**
     * Creates a list populated by the callback's controller and method.
     * Calls the function in the list passed as a parameter.
     * @param $method
     */
    protected static function call_function($callback) {
        list($controller, $method) = Str::parseCallback($callback);
        call_user_func([new $controller, $method]);
        exit();
    }
 
    /**
     * Checks if the query has no results (404).
     * @param $method
     */
    public static function is_404($method) {
        if (function_exists("is_404") && is_404()) {
            self::call_function($method);
        }
    }
 
    /**
     * Checks if you are on the BLOG homepage, if you set a static page as the front page this conditional tag
     * will return true only if you are on the page you set as the "Posts page".
     * @param $method
     */
    public static function is_home($method) {
        if (function_exists("is_home") && is_home()) {
/home/forge/deploy/faubourg.ayctor.dev/shared/vendor/ayctor/wp-core/src/WpCore/Bootstrap/Router.php
 
    /**
     * Checks if the query is for an existing single PAGE.
     * @param $page
     * @param $method
     */
    public static function is_page($method, $page = '') {
        if (function_exists("is_page") && is_page($page)) {
            self::call_function($method);
        }
    }
 
    /**
     * Checks if the query is for an existing single POST of any of the given types.
     * @param $method
     * @param string $post_type
     */
    public static function is_singular($method, $post_type = '') {
        if(function_exists("is_singular") && is_singular($post_type)) {
            self::call_function($method);
        }
    }
 
    /**
     * Checks if the query is for an existing single POST.
     * @param $method
     * @param string $post
     */
    public static function is_single($method, $post = '') {
        if(function_exists("is_single") && is_single($post)) {
            self::call_function($method);
        }
    }
 
    /**
     * Checks if the query is for an existing post type archive page.
     * @param $method
     * @param string $post_type
     */
    public static function is_post_type_archive($method, $post_type = '') {
/home/forge/deploy/faubourg.ayctor.dev/releases/32/index.php
<?php
 
use WpCore\Bootstrap\Router;
 
Router::is_404('\Ayctor\Controllers\PageController@notFound');
Router::is_home('\Ayctor\Controllers\PageController@index');
Router::is_page('\Ayctor\Controllers\PageController@planSite', 'plan-du-site');
Router::is_page('\Ayctor\Controllers\PageController@references', 'references');
Router::is_page('\Ayctor\Controllers\PageController@page');
Router::is_singular('\Ayctor\Controllers\ProjectController@show', 'project');
Router::is_singular('\Ayctor\Controllers\BuildingController@show', 'building');
Router::is_singular('\Ayctor\Controllers\PageController@post', 'post');
 
Router::default('\Ayctor\Controllers\PageController@default');
 
/home/forge/faubourg.ayctor.dev/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/forge/deploy/faubourg.ayctor.dev/releases/32/index.php"
    
/home/forge/faubourg.ayctor.dev/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/forge/faubourg.ayctor.dev/wp-includes/template-loader.php"
    
/home/forge/faubourg.ayctor.dev/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/forge/faubourg.ayctor.dev/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"nginx/1.26.2"
REQUEST_URI
"/references/batiment/la-farlede/parc-agroalimentaire-de-la-farlede-bat-b/bigard-distribution/"
USER
"forge"
HOME
"/home/forge"
HTTP_REFERER
"https://faubourg.ayctor.dev/references/batiment/la-farlede/parc-agroalimentaire-de-la-farlede-bat-b/bigard-distribution"
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
"faubourg.ayctor.dev"
REDIRECT_STATUS
"200"
HTTPS
"on"
SERVER_NAME
"faubourg.ayctor.dev"
SERVER_PORT
"443"
SERVER_ADDR
"51.210.182.69"
REMOTE_PORT
"54176"
REMOTE_ADDR
"3.138.175.10"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/2.0"
DOCUMENT_ROOT
"/home/forge/faubourg.ayctor.dev"
DOCUMENT_URI
"/index.php"
SCRIPT_NAME
"/index.php"
SCRIPT_FILENAME
"/home/forge/faubourg.ayctor.dev/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1732481507.7079
REQUEST_TIME
1732481507
WP_ENV
"staging"
MAIL_HOST
"in.mailjet.com"
MAIL_PORT
"587"
MAIL_USERNAME
"2fe8e3059a5051b4a4442d2337023737"
MAIL_PASSWORD
"45104832f18bfb69edcd834fe727276f"
MAIL_FROM_ADDRESS
"contact@ayctor.com"
MAIL_FROM_NAME
"Ayctor"
MIX_APP_URL
"faubourg.ayctor.dev"
BUGSNAG_API_KEY
"598ab32ac0caed918dafcc6bd45413d5"
MAP_API_KEY
"AIzaSyDl2ssIGCBajViHFIKGkcumy2pmTzpkp2g"
GA_UA
"UA-146643272-2"
ACF_LITE
"true"
TWITTER_TOKEN
"790474975459348484-ePfCrOp12Cq2YPoPgrWpqFludIZ90fD"
TWITTER_TOKEN_SECRET
"KapM9n1pthM0ABf3eAapP6J8zHsqBEEB7PYHR2S73DMba"
TWITTER_CONSUMER_KEY
"GfO1XgVvz2fcysHu65g7zvQJJ"
TWITTER_CONSUMER_SECRET
"3BV61HVtyebaVYqRhS3wDHYJLv04RIpgLJBDQT8AiJo1v5bGNd"
ELASTIC_USER
""
ELASTIC_PASSWORD
""
ELASTIC_HOST
""
ELASTIC_PORT
""
ELASTIC_SSL
""
FORM_CONTACT
"1"
FORM_PROJECT
"2"
FORM_NEWSLETTER
"3"
FORM_NEWSLETTER_FOOTER
"4"
Key Value
WP_ENV
"staging"
MAIL_HOST
"in.mailjet.com"
MAIL_PORT
"587"
MAIL_USERNAME
"2fe8e3059a5051b4a4442d2337023737"
MAIL_PASSWORD
"45104832f18bfb69edcd834fe727276f"
MAIL_FROM_ADDRESS
"contact@ayctor.com"
MAIL_FROM_NAME
"Ayctor"
MIX_APP_URL
"faubourg.ayctor.dev"
BUGSNAG_API_KEY
"598ab32ac0caed918dafcc6bd45413d5"
MAP_API_KEY
"AIzaSyDl2ssIGCBajViHFIKGkcumy2pmTzpkp2g"
GA_UA
"UA-146643272-2"
ACF_LITE
"true"
TWITTER_TOKEN
"790474975459348484-ePfCrOp12Cq2YPoPgrWpqFludIZ90fD"
TWITTER_TOKEN_SECRET
"KapM9n1pthM0ABf3eAapP6J8zHsqBEEB7PYHR2S73DMba"
TWITTER_CONSUMER_KEY
"GfO1XgVvz2fcysHu65g7zvQJJ"
TWITTER_CONSUMER_SECRET
"3BV61HVtyebaVYqRhS3wDHYJLv04RIpgLJBDQT8AiJo1v5bGNd"
ELASTIC_USER
""
ELASTIC_PASSWORD
""
ELASTIC_HOST
""
ELASTIC_PORT
""
ELASTIC_SSL
""
FORM_CONTACT
"1"
FORM_PROJECT
"2"
FORM_NEWSLETTER
"3"
FORM_NEWSLETTER_FOOTER
"4"
0. Whoops\Handler\PrettyPageHandler