TypeError
array_filter(): Argument #1 ($array) must be of type array, false given TypeError thrown with message "array_filter(): Argument #1 ($array) must be of type array, false given" Stacktrace: #5 TypeError in /home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php:74 #4 array_filter in /home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php:74 #3 filter_order_sessions in /home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/front/templates/single-custom_post_type.php:72 #2 include in /home/eyth8214/public_html/tpe/sauvetage-annecy/wp-includes/template-loader.php:132 #1 require_once in /home/eyth8214/public_html/tpe/sauvetage-annecy/wp-blog-header.php:19 #0 require in /home/eyth8214/public_html/tpe/sauvetage-annecy/index.php:17
Stack frames (6)
5
TypeError
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php74
4
array_filter
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php74
3
filter_order_sessions
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/front/templates/single-custom_post_type.php72
2
include
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-includes/template-loader.php132
1
require_once
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-blog-header.php19
0
require
/home/eyth8214/public_html/tpe/sauvetage-annecy/index.php17
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php
// }
function get_session_registration($event_id, $session_id)
{
    $registrations = get_field('registrations', $event_id);
    $session_registration = array();
    foreach ($registrations as $registration_id) {
        $datas = get_field('form_datas', $registration_id);
        if ($datas['session_id'] == $session_id) {
            $session_registration[] = $registration_id;
        }
    }
 
    return $session_registration;
}
function filter_order_sessions($sessions)
{
    $current_time = new DateTime();
 
    // Filtrer les sessions dont l'heure de début est dépassée
    $filtered_sessions = array_filter($sessions, function ($session) use ($current_time) {
        $session_start = new DateTime($session['session_start']);
        return $session_start >= $current_time;
    });
 
    // Ordonner les sessions restantes par date et heure de début
    usort($filtered_sessions, function ($a, $b) {
        $start_a = new DateTime($a['session_start']);
        $start_b = new DateTime($b['session_start']);
        return $start_a <=> $start_b;
    });
 
    return $filtered_sessions;
}
 
function format_event_dates($start_date, $end_date)
{
    // Convertir les chaînes de caractères en objets DateTime si nécessaire
    if (is_string($start_date)) {
        $start_date = new DateTime($start_date);
    }
Arguments
  1. "array_filter(): Argument #1 ($array) must be of type array, false given"
    
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/walt-calendar-functions.php
// }
function get_session_registration($event_id, $session_id)
{
    $registrations = get_field('registrations', $event_id);
    $session_registration = array();
    foreach ($registrations as $registration_id) {
        $datas = get_field('form_datas', $registration_id);
        if ($datas['session_id'] == $session_id) {
            $session_registration[] = $registration_id;
        }
    }
 
    return $session_registration;
}
function filter_order_sessions($sessions)
{
    $current_time = new DateTime();
 
    // Filtrer les sessions dont l'heure de début est dépassée
    $filtered_sessions = array_filter($sessions, function ($session) use ($current_time) {
        $session_start = new DateTime($session['session_start']);
        return $session_start >= $current_time;
    });
 
    // Ordonner les sessions restantes par date et heure de début
    usort($filtered_sessions, function ($a, $b) {
        $start_a = new DateTime($a['session_start']);
        $start_b = new DateTime($b['session_start']);
        return $start_a <=> $start_b;
    });
 
    return $filtered_sessions;
}
 
function format_event_dates($start_date, $end_date)
{
    // Convertir les chaînes de caractères en objets DateTime si nécessaire
    if (is_string($start_date)) {
        $start_date = new DateTime($start_date);
    }
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/front/templates/single-custom_post_type.php
                                    </li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
 
 
                    <?php endif; ?>
                </div>
 
                <div class="icol-6_md-12">
                    <div class="thumb rounded-global">
                        <?= get_post_thumbnail_id($post->ID) ? walt_get_media(get_post_thumbnail_id($post->ID), 704, 'wrapper-default', 'icol-6_md-12') : walt_get_media(get_field('default_publications_thumbnail_placeholder', 'option'), 'large') ?>
                    </div>
                </div>
 
            </div>
 
            <?php if ($use_sessions):
                // $sessions = ;
                $sessions =  filter_order_sessions(get_field('sessions', $id));
                if ($sessions) : ?>
                    <div class="main_content_session">
 
                        <h2><?php _e('Nos prochaines sessions', 'static') ?></h2>
 
                        <?php foreach ($sessions as $session): ?>
                            <?php walt_template_part(WALT_CALENDAR_PATH_PARTS . '/components/session-accordion.php', array('to_buy' => false, 'session' => $session, 'event_id' => $post->ID)); ?>
                        <?php endforeach ?>
                    </div>
                <?php endif ?>
            <?php else : ?>
 
 
                <div class="main_content_session">
 
                    <?php
                    $session = array(
                        'session_start' => get_field('event_start'),
                        'session_end' => get_field('event_end'),
                        'position' => get_field('event_localisation'),
/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-includes/template-loader.php
     */
    $template   = apply_filters( 'template_include', $template );
    $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
    $template   = $is_stringy ? realpath( (string) $template ) : null;
    if (
        is_string( $template ) &&
        ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
        is_file( $template ) &&
        is_readable( $template )
    ) {
        /**
         * Fires immediately before including the template.
         *
         * @since 6.9.0
         *
         * @param string $template The path of the template about to be included.
         */
        do_action( 'wp_before_include_template', $template );
 
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
Arguments
  1. "/home/eyth8214/public_html/tpe/sauvetage-annecy/wp-content/plugins/walt-wp-calendar/front/templates/single-custom_post_type.php"
    
/home/eyth8214/public_html/tpe/sauvetage-annecy/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/eyth8214/public_html/tpe/sauvetage-annecy/wp-includes/template-loader.php"
    
/home/eyth8214/public_html/tpe/sauvetage-annecy/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/eyth8214/public_html/tpe/sauvetage-annecy/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"Apache"
REQUEST_URI
"/formations/fc-bsb-formation-continue-brevet-de-surveillance-de-baignade/"
PATH
"/usr/local/bin:/usr/bin:/bin"
TEMP
"/tmp"
TMP
"/tmp"
TMPDIR
"/tmp"
PWD
"/"
LSCAPI_CRIU_SYNC_FD
"7"
DOCUMENT_ROOT
"/home/eyth8214/public_html/tpe/sauvetage-annecy"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_LANGUAGE
"en-US,en;q=0.5"
CONTENT_LENGTH
"0"
HTTP_HOST
"annecysauvetage.com"
HTTP_USER_AGENT
"CCBot/2.0 (https://commoncrawl.org/faq/)"
HTTP_X_COUNTRY_CODE
"US"
HTTP_X_AUTONOMOUS_SYSTEM
"14618"
HTTP_X_REAL_IP
"18.97.14.89"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_FORWARDED_PORT
"443"
HTTP_X_SSL
"yes"
HTTP_X_HTTPS
"1"
REDIRECT_UNIQUE_ID
"alz6eBTUU-XgZmoZYaTSUwAABos"
REDIRECT_SCRIPT_URL
"/formations/fc-bsb-formation-continue-brevet-de-surveillance-de-baignade/"
REDIRECT_SCRIPT_URI
"https://annecysauvetage.com/formations/fc-bsb-formation-continue-brevet-de-surveillance-de-baignade/"
REDIRECT_HTTP_AUTHORIZATION
""
REDIRECT_HTTPS
"on"
REDIRECT_SSL_TLS_SNI
"annecysauvetage.com"
REDIRECT_STATUS
"200"
UNIQUE_ID
"alz6eBTUU-XgZmoZYaTSUwAABos"
SCRIPT_URL
"/formations/fc-bsb-formation-continue-brevet-de-surveillance-de-baignade/"
SCRIPT_URI
"https://annecysauvetage.com/formations/fc-bsb-formation-continue-brevet-de-surveillance-de-baignade/"
HTTP_AUTHORIZATION
""
HTTPS
"on"
SSL_TLS_SNI
"annecysauvetage.com"
SERVER_SIGNATURE
""
SERVER_NAME
"annecysauvetage.com"
SERVER_ADDR
"109.234.165.188"
SERVER_PORT
"443"
REMOTE_ADDR
"18.97.14.89"
REQUEST_SCHEME
"https"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/eyth8214/public_html/tpe/sauvetage-annecy"
SERVER_ADMIN
"webmaster@annecysauvetagecom.eyth8214.odns.fr"
SCRIPT_FILENAME
"/home/eyth8214/public_html/tpe/sauvetage-annecy/index.php"
REMOTE_PORT
"32772"
REDIRECT_URL
"/formations/fc-bsb-formation-continue-brevet-de-surveillance-de-baignade/"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
SCRIPT_NAME
"/index.php"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1784478328.2243
REQUEST_TIME
1784478328
empty
0. Whoops\Handler\PrettyPageHandler